Saturday, April 26, 2008

Use a Dashboard Widget outside Dashboard

Although it seems strange, it is true: you can use a Dashboard Widget outside the Dashboard environment! The way to accomplish it includes the following steps:

- First you open Dashboard.
- After opening Dashboard, you should press the little circle with the cross on the bottom left corner of Dashboard.
- Then you select the Widget you want to bring outside Dashboard and click on it.
- You start dragging the Widget.
- You should now keep your mouse button pressed and close Dashboard (by pressing the F12 key for example).
- You now release the pressed mouse button.
- Your Widget is still there but Dashboard is gone! You are in Finder now.
Note: Before doing the above steps, you should give the following command at your terminal:
defaults write com.apple.dashboard devmode YES
This command activates the Dashboard Development mode and keeps it active until you type the same command, having a NO instead of YES at the end. You should now login/logout or restart your Mac for the setting to take effect.

If you want to insert a Widget that is located outside Dashboard, inside Dashboard you should follow the reverse procedure!

Did you find the above information helpful? You will find a lot more information in my eBook "Programming Dashboard Widgets". You can buy it here.

Thursday, April 24, 2008

Widgets and the defaults command

You can use the defaults command (from Terminal.app) to learn more about the options of a Widget.

Example: defaults read widget-com.apple.widget.translation
gives:
{
    "41a9b19e2d5c5543-fromLanguage" = 3;
    "41a9b19e2d5c5543-toLanguage" = 5;
    fromLanguage = 3;
    toLanguage = 5;
}

Found it in Dashboard-dev mailing list.

Friday, April 18, 2008

Monday, April 7, 2008

Do not use a directory called "resources" inside a Widget

If you have a folder called "resources" inside your Widget, this will create troubles with the Widget's concept of "Resources". Do not use that name.


(from the dashboard-dev mailing list)