Specifying Access Keys

If your widget needs resources that extend beyond your widget's bundle or HTML, CSS, and JavaScript technologies, you need to take Dashboard's Info.plist Access keys into account.

Using Access Keys

Dashboard allows you to "declare your intentions" when you:

"Declaring your intentions" means that before your widget is run, you specify in your widget’s information property list file which resources you want to use. The keys and their meaning are listed in Table 17:

Table 17  Info.plist Keys for the Widget resource access

Key

Type

Definition

Example

AllowFileAccessOutsideOfWidget

Boolean

Access to files across the file system; limited by the user’s permissions.

<img src="~/Sites/images/macosxlogo.png">

AllowFullAccess

Boolean

Access to the file system, WebKit and standard browser plug-ins, Java applets, network resources, and command-line utilities.

N/A

AllowInternetPlugins

Boolean

Access to WebKit and standard browser plug-ins, such as QuickTime.

<embed src="http://www.foo.com/bar.mov" type="video/quicktime" width="320" height="256"></embed>

AllowJava

Boolean

Access to Java applets.

<applet code="foo.class" width="320" height="256"></applet>

AllowNetworkAccess

Boolean

Access to any resources that are not file-based, including those acquired through the network.

<img src="http://www.foo.com/bar.png">

AllowSystem

Boolean

Access to command-line utilities using the widget script object.

var s = widget.system("/usr/bin/foo", null);

Plugin

String

Specifies a widget plug-in.

foo.widgetplugin

If you attempt to use any of these resources without first specifying them in your widget’s information property list file, your attempt fails.