Apple Newton Utilities User's Guide Page 714

  • Download
  • Add to my manuals
  • Print
  • Page
    / 942
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 713
CHAPTER 19
Built-in Applications and System Data
19-40 Icons and the Extras Drawer
Using Extras Drawer Cursors 19
The Extras Drawer method GetPartCursor creates a cursor that can iterate over
parts (icons) in the Extras Drawer. You can create a cursor that iterates over parts in
a specic store, a particular folder of the Extras Drawer, a particular package, or a
combination of these criteria. This cursor is a normal soup cursor, as described in
Chapter 11, “Data Storage and Retrieval.
Entries returned by part cursors are subject to change. These entries should be
manipulated only with one of the following three Extras Drawer methods:
GetPartEntryData returns information about a part.
LaunchPartEntry has the same effect as the user tapping the icon.
SetExtrasInfo sets data in a part entry; see “Changing Icon Information.
Changing Icon Information 19
The Extras Drawer method SetExtrasInfo can be used to change the icon or
text under an icon. It can also change the
labels slot of an icon, which has the
effect of ling the icon. If the icon is a soup icon, you may also change the array of
soups that this icon represents and the application that owns these soups.
Adding a Soup Icon 19
If your application uses more than one soup or you want to le or move entire
soups through the soupervisor mechanism, you should consider using a soup icon,
so that only one icon appears in the Extras Drawer. You should store this icon in the
internal store, otherwise all the component soups will reappear when the external
store is removed. Also, you should give the icon a different package name from
your application in your call to
AddExtraIcon, both as the pkgName parameter
and in the
app slot of the paramFrame parameter. Again, this is so that it is not
removed when your application is.
You add a soup icon to the Extras Drawer by calling its
AddExtraIcon method.
Passing the symbol
'soupEntry for the rst parameter species that the icon to
add is a soup icon.
The rest of this section provides sample code for installing a soup icon. Before
trying to understand this code, you should read the description of
AddExtraIcon
(page 16-88) in Newton Programmers Reference.
//Useful constants
constant kMySoupNamesArray := '["soup1:NDTS",
"soup2:NDTS", "soup3:NDTS" ];
constant kMySoupUserName := "Souper Thing";
DefConst('kSoupPackageName, "Soups:" & kPackageName);
Page view 713
1 2 ... 709 710 711 712 713 714 715 716 717 718 719 ... 941 942

Comments to this Manuals

No comments