Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 338 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
338
Dung lượng
9,25 MB
Nội dung
[...]... Chapter 1 Managing Dashboard s Widgets In the Tiger 10.4.2 release, Apple introduced the Widgets widget The Widgets widget provides a compact interface for managing widgets (Figure 1-5) You open the Widgets widget by clicking the Manage Widgets button after you have opened the Widget Bar Widgets provides you with a scrolling list of the widgets installed in your account and the System This widget allows... appear next to these widgets 8 Tiger, Dashboard, and Widgets Figure 1-6 Clicking the More Widgets button at the bottom of the Widgets widget launches Safari, if it isn’t already running, and takes you to Apple’s Dashboard Widgets website (http://www.apple.com/downloads/ dashboard/ ) Installing Widgets So how do you get additional widgets installed? In the Tiger 10.4.2 release, Apple changed widget installation... to Exercises 291 Appendix B: Additional Dashboard Programming Information 295 Appendix C: Widget Distribution 301 Index 305 xi Introduction Dashboard widgets are based on the technologies that have been powering the Web for nearly two decades At their simplest, widgets are HTML pages that run inside of Dashboard There’s more to a Dashboard widget than HTML, of course Cascading Style Sheets provide widgets... are adding widgets to Dashboard One way to manage your widgets, for instance, is to uncheck all of the widgets that you want to keep installed, but don’t use very often The widgets that you use regularly but don’t add to Dashboard are in the Widget Bar, ready for you to add quickly If you want to remove or uninstall a widget, you click the red minus sign next to its name in the Widgets widget Dashboard. .. built-in mechanism for installing widgets Before you run through this example, you should have Apple’s Xcode development environment installed because you will use one of the example widgets supplied with it Try It Out Install a Local Widget 1 Open the /Developer/Examples /Dashboard/ Sample Widgets/ folder 9 Chapter 1 2 Double-click the Hello World widget (Hello World.wdgt) The Widget Installer prompts you... you click the Install button, the widget is copied to the Widgets folder in your Library folder and Dashboard opens with the widget in a box and the option to keep or delete it (Figure 1-11) Figure 1-11 12 Tiger, Dashboard, and Widgets If you aren’t using Safari, you will probably have to double-click the widget to open the Widget Installer Reloading Widgets Because widgets are essentially web pages,... describe the location of your Widget folder, not the System’s Widget folder? 2 The Basics of Widgetr y In Chapter 1, you learned about Dashboard and Dashboard widgets as well as how the Widget Installer works Now you look under the hood and see how widgets are assembled before moving on to writing a widget In this chapter, you examine the individual components of some Tiger widgets to see how they are... network database Widgets can also run any Unix command or AppleScript on OS X Having instant access to all of your information and OS X services is what really makes the Dashboard metaphor work You can even see it reflected in the Dashboard icon; each widget represents one gauge on your Dashboard Whom This Book Is For This book is for anyone who wants to create Dashboard widgets or modify existing ones... of each example is a detailed explanation of the example in the “How It Works” section The examples in the book help you gain an understanding of the elements and construction of Dashboard widgets When possible, the concepts that you learn in one example are incorporated into another widget example so you can see how they are related to each other within a widget Rather than build one large widget with... the exercises The following is a summary of the topics covered in each chapter: ❑ ❑ Chapter 2, “The Basics of Widgetry,” explains the different parts of a widget The chapter shows how widgets are constructed by examining the HTML, Cascading Style Sheet, JavaScript, and property list files of the widgets supplied with Tiger ❑ Chapter 3, Widget Development Environment,” introduces the different development . class="bi x0 y0 w0 h0" alt="" Beginning Mac OS ® X Tiger ™ Dashboard Widget Development Fred Terry 01_778257 ffirs.qxp 6/9/06 9:29 AM Page i Beginning Mac OS ® X Tiger ™ Dashboard Widget Development Fred. and Indexing Techbooks 01_778257 ffirs.qxp 6/9/06 9:29 AM Page iv Contents Introduction xiii Part I: An Introduction to Widgets 1 Chapter 1: Tiger, Dashboard, and Widgets 3 OS X Tiger 3 Dashboard. Additional Dashboard Programming Information 295 Appendix C: Widget Distribution 301 Index 305 02_778257 ftoc.qxp 6/9/06 9:29 AM Page xi 02_778257 ftoc.qxp 6/9/06 9:29 AM Page xii Introduction Dashboard