Hi, folks! I take it this is the right forum for questions related to Dashboard widget development?
I've been working on my first "real" widget (i.e. the first one that wasn't a prefab countdown widget) the past few days in Dashcode. I don't have a lot of experience with Javascript, or aptitude for coding in general, but I've been managing to scrape by with Google's help. This particular issue, though, is proving difficult to find information about.
I have a "credits" label on the back of my widget. (I plan to add code to cycle through a series of strings each time it's clicked, "About This Mac"-style, to take advantage of the limited space, but that's unimportant here.) What I'd like to do is have my script pull the widget's version number from Info.plist and append it to the credits string, to save me having to update the version number in multiple places if and when I update the widget.
I can't seem to find a "canon" way to do this, though the documentation I've seen doesn't mention anything along the lines of simply calling something like widget.version, or having some sort of already-prepared object with the plist's contents ready-to-use. Does this mean I'll have to have the widget run the entire plist through an XML parser and then pick out the one value I actually want? Is there something I'm missing that provides a simpler way to accomplish this? Am I just plain overcomplicating things here?
Thanks for any and all help you can provide this poor noob!
I've been working on my first "real" widget (i.e. the first one that wasn't a prefab countdown widget) the past few days in Dashcode. I don't have a lot of experience with Javascript, or aptitude for coding in general, but I've been managing to scrape by with Google's help. This particular issue, though, is proving difficult to find information about.
I have a "credits" label on the back of my widget. (I plan to add code to cycle through a series of strings each time it's clicked, "About This Mac"-style, to take advantage of the limited space, but that's unimportant here.) What I'd like to do is have my script pull the widget's version number from Info.plist and append it to the credits string, to save me having to update the version number in multiple places if and when I update the widget.
I can't seem to find a "canon" way to do this, though the documentation I've seen doesn't mention anything along the lines of simply calling something like widget.version, or having some sort of already-prepared object with the plist's contents ready-to-use. Does this mean I'll have to have the widget run the entire plist through an XML parser and then pick out the one value I actually want? Is there something I'm missing that provides a simpler way to accomplish this? Am I just plain overcomplicating things here?
Thanks for any and all help you can provide this poor noob!