Dashcode Widget AJAX Gotcha

This is a post, that hopefully will help someone who might have the same issue as me, so they don’t spend 3 hours of their life double guessing their JavaScript, when all they need to do is check a box.

The other evening I was playing around with building a Dashboard widget for I Went Away, so that people could easily update their away message.

First pass through and first pass using dashcode, I found it all very easy going…until.

I had some simple AJAX code that pinged the I Went Away site and added a new status. Super easy, I was using the drga and drop code with some slight tweaks to make it more how I would do it.

Run a test, enter some data and ….nothing…

No error, no weird looking response, no failed, just nothing.

After a couple of hours of attempted debugging, tweaking, more debugging, using the OOTB dashcode Ajax, using other Ajax JavaScript, reaching the point of total failure and change of careers.

I find that you have to check a box in the dashcode interface that sets a plist setting that allow the dashboard widget you create to connect to the network.

Picture 1

Problem solved.

I’m really becoming a huge fan of things like dashcode. I’m hoping Apple moves even more in the direction of allow “apps” to be built for OSX using the dashcode, HTML, JavaScript and OS level code mix. It really does lower the entry level.

My next step is to play with xcode and ibuilder, and see if I can finish off my I Went Away screen saver. My total lack of objective C experience will no doubt frustrate me, but we’ll see how far I can get hacking tutorials and documentation together into combined code mutants.

About this entry