Apple Mac OS X Tiger 10.4 NL CD Mac Retail M9639N/A 전단
제품 코드
M9639N/A
6
Technology Brief
Mac OS X: Dashboard
Mac OS X: Dashboard
Easy to create
A widget is a special directory called a “bundle” that consists of at least four files and
is identified by the .wdgt filename extension. While bundles can be opened and exam-
ined as a directory, they appear to users as a single item in the file system, making
them easy to copy, move, install, and distribute. The basic elements of a widget are:
A widget is a special directory called a “bundle” that consists of at least four files and
is identified by the .wdgt filename extension. While bundles can be opened and exam-
ined as a directory, they appear to users as a single item in the file system, making
them easy to copy, move, install, and distribute. The basic elements of a widget are:
•
A PNG background image. This file is displayed while the widget is being loaded.
•
An icon. This is also a PNG file and represents the widget in the Widget Bar.
•
An HTML file. This file contains the implementation of the widget and specifies the
image used as the background and any text or controls to display. The HTML file is a
plain-text (ASCII) file and can be created using your favorite word processor or text
editor. In the HTML file, you can use any technique or trick that you would use when
designing a web page, including HTML, CSS, and JavaScript.
image used as the background and any text or controls to display. The HTML file is a
plain-text (ASCII) file and can be created using your favorite word processor or text
editor. In the HTML file, you can use any technique or trick that you would use when
designing a web page, including HTML, CSS, and JavaScript.
While you can place all of your HTML, CSS, and JavaScript code into one file, splitting
the markup, design, and logic into separate files makes the code easier to debug and
simplifies localization.
the markup, design, and logic into separate files makes the code easier to debug and
simplifies localization.
Widgets are based on the same HTML standard used to create web pages.
You can test a widget using Dashboard or Safari. Use the keyboard shortcut
Command-R to reload a widget in Dashboard after making a change. Many widgets
also run in Safari, speeding the repetitive test, debug, recode, and test process used
to create a widget.
Command-R to reload a widget in Dashboard after making a change. Many widgets
also run in Safari, speeding the repetitive test, debug, recode, and test process used
to create a widget.
•
An info.plist file. This file specifies details about the widget, such as its name, size,
unique ID, and more. You can create the file using a text editor, but Mac OS X also
includes a property list editor utility to make the task easier.
unique ID, and more. You can create the file using a text editor, but Mac OS X also
includes a property list editor utility to make the task easier.