View Full Version : Read and Write to file, from Widget?
May 4th, 2010, 12:16 PM
Is there a way I can make a widget read and write to file(on my local computer)?
May 5th, 2010, 10:55 AM
Any widget that contains or stores data locally, does it on your hard drive. So for instance the data written in stickies widget will be read and written on your local hard drive.
But you probably had something a bit more specific in your mind if I'm not mistaken?
May 5th, 2010, 01:15 PM
If you're talking about Dashboard widgets, then I'm not sure if they can or can't, but I would suspect that they cannot.
May 5th, 2010, 04:07 PM
I want to make a widget where I type in my name and it store that name in a text file. And I want the widget to read from another text file.
May 6th, 2010, 11:34 AM
What other applications do you need to use the content of those text files?
If it's only a few files you need to get read/written all the time, then the Stickies widget may be enough for you. Everything it stores is locally.
If it's something more complicated, the widget developer reference isn't a bad place to start (for even writing your own). The links are for 10.4 but they are essentially the same for 10.6.
Optional; specify if your widget requires access to the file system outside of your widget. Access is limited by the user’s permissions
According to that one option alone, you could specify your widget to access a file outside it (as long as the user can access it).
If there are only a few files that you want to use with Dashboard all the time, copy each to a separate sticky.
Those files can contain quite a bit of text, and you can have dozens of them, and minimize when not in use.
That way you don't have to worry about the files separately, just create stickies for whatever you need (e.g. I used about 20 different ones for frequently copy pasted material at work this way)
May 10th, 2010, 09:37 PM
May 11th, 2010, 07:47 AM
Did you have a question about my post or something?