PDA

View Full Version : need help with widget


exec
2005.10.19, 10:08 AM
hi currently i am programming a widget that will extract some information about different application preferences from username\library\preferences stored as plist files and then display them on my widget and allow users to change it with ease. i figure that plist is basically xml so i was thinking of some sort of xml parser but im not sure javascript can do this. im not sure if perl or plugin is right way to go. so can anybody give some tips or pointers or links to examples of similar widgets cuz im quite new at programming for mac

thx in advance!!

Taxxodium
2005.10.19, 11:04 AM
Search for the XMLHttpRequest javascript object. It's not too hard to use.

exec
2005.10.20, 05:53 AM
yeah i had a look at this javascript object before, but according to the documentation it retrives the xml files via http requests like get or post; im not sure about macs, but do they automatically have a http server enabled or something?? sorry im new to this system, but i know how to program.

Taxxodium
2005.10.20, 06:04 AM
You don't need to have a server running to use XMLHttpRequest, that would be very user unfriendly. You use it to get an xml-based file from the internet and parse it. It's not like a php file or something.

exec
2005.10.20, 06:28 AM
will it work with a local file ? im trying to parse the plist files that stores app preferences

Taxxodium
2005.10.20, 06:35 AM
will it work with a local file ?

Yes, replace http:// with file:///<full path> (replace <full path> with the actual path to the file)