Available:*
Library | Item Barcode | Call Number | Material Type | Item Category 1 | Status |
---|---|---|---|---|---|
Searching... | 30000010115920 | QA76.76.O63 T474 2006 | Open Access Book | Book | Searching... |
Searching... | 30000010115921 | QA76.76.O63 T474 2006 | Open Access Book | Book | Searching... |
On Order
Summary
Summary
Aimed at the estimated 300,000 Mac OS X developers who are interested in customizing and creating widgets for their Dashboards, this timely book shows them how to tap into the power of Mac OS X Tiger to create and customize Dashboard widgets The expert author uses program examples and exercises to illustrate the different ways to customize the Dashboard through widget development using simple authoring tools, Internet plug-ins, and text editors Begins with a discussion of the Dashboard concept and configuration and progresses to coverage of advanced functionality Covers tools, protecting code, configuration, properties, bundles, resources, extensions, and much more
Author Notes
Fred Terry has been involved in the computer industry since making a left-hand turn into it from Ph.D. work in medieval languages and literature. He has written a number of software manuals and articles and has worked as a systems and network administrator, web developer, programmer, and quality assurance engineer. In addition to his ongoing love affairs with AppleScript and Perl, his current programming infatuations are Ruby and Ajax. Currently, Fred is a project manager for the Information Management Group at Burns & McDonnell. He has a B.A. in English from Southwestern Oklahoma State University and an M.A. in English from Oklahoma State University. He lives in Lawrence, Kansas, with his family and dog. Fred can be contacted at pfterry@deadtrees.net.
Table of Contents
Introduction | p. xiii |
Part I An Introduction to Widgets | p. 1 |
Chapter 1 Tiger, Dashboard, and Widgets | p. 3 |
OS X Tiger | p. 3 |
Dashboard and Widgets | p. 4 |
Managing Dashboard's Widgets | p. 8 |
Installing Widgets | p. 9 |
Installing Local Widgets | p. 9 |
Downloading and Installing | p. 11 |
Reloading Widgets | p. 13 |
What Widgets Are Not | p. 13 |
Summary | p. 14 |
Exercises | p. 14 |
Chapter 2 The Basics of Widgetry | p. 15 |
What a Widget Is Composed Of | p. 15 |
HTML, CSS, and JavaScript | p. 17 |
HTML | p. 18 |
CSS | p. 19 |
JavaScript | p. 21 |
Property Lists | p. 23 |
Widget Properties | p. 24 |
Creating Property Lists | p. 26 |
Icons and Images | p. 30 |
How to Bundle Your Widget | p. 31 |
Summary | p. 33 |
Exercises | p. 33 |
Chapter 3 Widget Development Environment | p. 35 |
An Editor and a Browser | p. 35 |
TextEdit and Safari | p. 36 |
BBEdit | p. 38 |
Using an Integrated Development Environment | p. 39 |
Widgetarium | p. 40 |
Xcode | p. 41 |
Starting Xcode | p. 41 |
Building a Plugin | p. 42 |
Enabling Dashboard Developer Mode | p. 47 |
Debugging Tools | p. 49 |
Using Safari as Your Debugger | p. 49 |
Third-Party Debugging Tools | p. 50 |
Summary | p. 53 |
Exercises | p. 53 |
Chapter 4 Creating a Widget | p. 55 |
HTML Beginnings | p. 55 |
Beginning the Project | p. 55 |
Begin with HTML | p. 57 |
Adding a Background | p. 59 |
Creating Widget Structure with CSS | p. 61 |
[left angle bracket]div[right angle bracket] Regions | p. 63 |
Doing the Work with JavaScript | p. 69 |
Building the Widget | p. 72 |
Making Sure It Works | p. 75 |
Summary | p. 75 |
Exercises | p. 76 |
Chapter 5 Debugging and Testing | p. 77 |
First Steps | p. 77 |
Debugging Tips | p. 77 |
Syntax and Logic Errors | p. 78 |
Widget Errors | p. 79 |
Debugging Tricks | p. 79 |
Use a Helpful Editor | p. 79 |
Simplify | p. 79 |
Log Files | p. 80 |
Printing Debug Information with Alert Statements | p. 81 |
Using a Debugger | p. 83 |
Debugging Tools | p. 83 |
Stepping Through a Widget | p. 83 |
Testing Your Widget | p. 86 |
Testing Tips | p. 86 |
Don't Test Your Own Stuff | p. 86 |
Break Your Widget | p. 86 |
Keep a Log | p. 86 |
What Now? | p. 87 |
Fixing Bugs | p. 87 |
Summary | p. 88 |
Exercises | p. 88 |
Part II Providing User Interaction | p. 89 |
Chapter 6 Giving a Widget Preferences | p. 91 |
Adding Preferences to Your Widget | p. 91 |
How to Show Preferences | p. 93 |
Creating a Back Side Panel | p. 94 |
Widget Resources | p. 95 |
Flipping a Widget | p. 95 |
The Widget's HTML File | p. 95 |
The Widget's CSS File | p. 97 |
The Widget's JavaScript File | p. 99 |
Testing Your Changes | p. 101 |
Adding Preferences | p. 102 |
Adding Preference Selection | p. 102 |
Saving and Reading Preferences | p. 108 |
Summary | p. 111 |
Exercises | p. 111 |
Chapter 7 Widget Events | p. 113 |
The Dashboard Activation Event | p. 113 |
Activation Properties | p. 114 |
System Resources | p. 117 |
Removing Widget Preferences | p. 119 |
Setting Widget Focus | p. 123 |
Dragging a Widget | p. 124 |
Control Regions | p. 125 |
Summary | p. 127 |
Exercises | p. 127 |
Chapter 8 Adding to the Widget Interface | p. 129 |
Resizing | p. 129 |
When to Resize the Widget | p. 132 |
How to Resize a Widget | p. 132 |
The HTML File | p. 135 |
The CSS File | p. 136 |
The JavaScript File | p. 140 |
Moving the Close Box | p. 145 |
Scrolling | p. 146 |
When to Add Scrolling | p. 146 |
The HTML File | p. 146 |
The CSS File | p. 147 |
The JavaScript File | p. 148 |
Summary | p. 151 |
Exercises | p. 151 |
Chapter 9 Adding Cut, Copy, and Paste to Your Widget | p. 153 |
Pasteboard | p. 153 |
Pasteboard Events | p. 153 |
Pasteboard Handlers | p. 154 |
Adding Pasteboard Handlers | p. 156 |
Summary | p. 157 |
Exercises | p. 157 |
Chapter 10 Adding Drag and Drop to the Widget | p. 159 |
Drag-and-Drop Events | p. 160 |
Dragging and Dropping from the Finder | p. 160 |
Using Drag and Drop | p. 161 |
HTML | p. 162 |
CSS | p. 163 |
JavaScript | p. 164 |
Dragging Between Widgets | p. 166 |
Summary | p. 167 |
Exercises | p. 167 |
Chapter 11 Access Keys | p. 169 |
Using Access Keys | p. 169 |
File System Access | p. 170 |
Command-Line Access | p. 171 |
Synchronous Usage | p. 173 |
Asynchronous Usage | p. 173 |
Network Access | p. 174 |
WebKit and Internet Plugin Access | p. 176 |
Widget Plugin Access | p. 177 |
Java Applet Access | p. 178 |
Full Access | p. 179 |
Summary | p. 180 |
Exercises | p. 181 |
Chapter 12 Using Plugins and Applets | p. 183 |
Plugins, Widgets, and Sharing | p. 183 |
Sharing Etiquette | p. 183 |
Why Use Plugins? | p. 184 |
Using Plugins in a Widget | p. 185 |
Finding Plugins on Your Mac | p. 185 |
QuickTime | p. 186 |
Incorporating Widget Plugins | p. 188 |
Using Java Applets | p. 190 |
Summary | p. 195 |
Exercises | p. 195 |
Part III Example Widgets | p. 197 |
Chapter 13 Easy Envelopes | p. 199 |
Easy Envelopes | p. 199 |
The Interface | p. 199 |
Easy Envelopes Internals | p. 203 |
Info.plist | p. 203 |
HTML/CSS | p. 204 |
JavaScript Functionality | p. 206 |
Minimize | p. 206 |
Return Address | p. 207 |
Page Setup and Font Panels | p. 208 |
Summary | p. 210 |
Chapter 14 SecureCopy Widget | p. 211 |
SSH & scp | p. 211 |
The SecureCopy Widget | p. 212 |
The Interface | p. 212 |
SecureCopy Internals | p. 213 |
Info.plist | p. 214 |
HTML/CSS | p. 214 |
JavaScript Functionality | p. 220 |
Using SecureCopy | p. 221 |
Summary | p. 223 |
Chapter 15 Amazon Album Art | p. 225 |
Amazon Album Art | p. 226 |
The Interface | p. 226 |
Amazon Album Art Internals | p. 229 |
Info.plist | p. 230 |
HTML/CSS | p. 230 |
JavaScript Functionality | p. 234 |
Get Details from iTunes | p. 236 |
Processing the Downloaded Image | p. 237 |
Summary | p. 240 |
Chapter 16 Timbuktu Quick Connect | p. 241 |
The Interface | p. 242 |
Timbuktu Quick Connect Internals | p. 244 |
Info.plist | p. 245 |
HTML/CSS | p. 246 |
JavaScript Functionality | p. 250 |
Summary | p. 252 |
Chapter 17 iPhoto Mini | p. 253 |
iPhoto Mini | p. 253 |
The Interface | p. 254 |
iPhoto Mini Internals | p. 255 |
Info.plist | p. 256 |
HTML/CSS | p. 257 |
JavaScript Functionality | p. 261 |
Summary | p. 264 |
Chapter 18 iTunes Connection Monitor | p. 265 |
iTunes Connection Monitor | p. 265 |
The Interface | p. 266 |
iTunes Connection Monitor Internals | p. 267 |
Info.plist | p. 268 |
HTML/CSS | p. 268 |
JavaScript Functionality | p. 270 |
Summary | p. 273 |
Chapter 19 More Widgets | p. 275 |
More Widgets | p. 275 |
The Interface | p. 275 |
More Widgets Internals | p. 278 |
Info.plist | p. 279 |
HTML/CSS | p. 280 |
JavaScript Functionality | p. 285 |
Summary | p. 289 |
Appendix A Answers to Exercises | p. 291 |
Appendix B Additional Dashboard Programming Information | p. 295 |
Appendix C Widget Distribution | p. 301 |
Index | p. 305 |