The Widget What I Wrote
After I heard of the release of Apple’s Dashcode beta I decided I’d give it a crack, even if I don’t get anywhere it doesn’t matter, and atleast it’ll look pretty if it doesn’t work!
So, how hard can it be? If there’s a tool to take the ballache out of coding that can only be a good thing? Right? hmm….
The actual making of the widget is straightforward; you have a template for most things you’d want a widget for, and they all seem to look perfectly functional. The problems start when it comes to personalising the template, using your own images and whatnot, primarily due to it’s beta status, it has no real manual to speak of, and secondly because it suffers from many of the same flaws that make me loathe iWork, or more specifically, keynote.
The first thing i wanted to change, naturally, was the layout. I made a new background in Photoshop the same size as the one already in the template (for simplicities sake). In dashcode there is an item in the sidebar called “Default Image”, belting, change that using the helpfully marked “import” button.
Now… does that change the background? It certainly looked like the background before i changed it, I took a look at the preview of the widget and no, it doesn’t change the background. Oh well, maybe I missed something, so i go back to “default image” and my image has gone… maybe i had to “regenerate” it… fair enough, re-imported, regenerated, done much? apparently not, but atleast it’s
still there when i go back, a partial result i suppose!
It turns out, that the “default image” is what the widget shows when it’s loading, too obvious to call it a loading image i guess, don’t want any old monkey being able to design these things do we?
So eventually, after tricking the user interface into accepting a new image, I have a widget with the background changed, This is where the demons of the inspector get unleashed.
As with keynote, the inspector is only capable of editing one field at a time, which i understand if one is an image and one a text field but when they are both text, in the same font, colour and size, why can’t I just make them all 4 points smaller? And black? It can’t possibly be that difficult to code that in!
The final thing I needed to do was make the icon for it, so that it matched the theme and the
content of the widget, again, there was a sidebar icon for this, so that makes it easy!
Not so much
I ended up having to transfer it in as a file after deploying the widget as no matter how i tried, dashcode refused to understand what i wanted to do! Nevermind, where there’s a will, there’s a way, I’m sure the release candidate will work properly, maybe it’s just a different type of learning curve, who knows?
My final widget is here, I’ve submitted it to the Apple Developer Connection to see if they want to put it on the database (even if it does only have a relatively short lifespan), but I wont be offended if they tell me to cock off!
Dave