Apple Newton Utilities Guida Utente Pagina 715

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 942
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 714
CHAPTER 19
Built-in Applications and System Data
Icons and the Extras Drawer 19-41
InstallScript := func (partFrame)
begin
local ed := GetRoot().extrasDrawer;
local iStore := GetStores()[0];
//check if our icon is already installed
if Length (ed:GetExtraIcons ('soupEntry,
kSoupPackageName, iStore)) = 0 then
call kAddExtraIconFunc with
('soupEntry,
{ //soups we are combining
soupNames: kMySoupNamesArray,
//title shown under the icon
text : kMySoupUserName,
//for the soupervisor mechanism
ownerApp : kAppSymbol,
//for access via SetExtrasInfo
app : kSoupPackageName,
}
//Note, we do not use kPackageName since
//we don’t want the icon moved when the
//package is moved.
kSoupPackageName,
iStore);
end;
The Extras Drawer method GetExtraIcons used in the above code to obtain an
array of soup icons that match the package name is described in GetExtraIcons
(page 16-90) in Newton Programmers Reference.
Removing a Soup Icon 19
Use the Extras Drawer method RemoveExtraIcon to remove your soup icon, as
in the following code:
//A good place for this would be in a DeletionScript
local ed := GetRoot().extrasDrawer;
foreach icon in ed:GetExtraIcons ('soupEntry,
kSoupPackageName, GetStores()[0]) do
ed:RemoveExtraIcon (icon);
Vedere la pagina 714
1 2 ... 710 711 712 713 714 715 716 717 718 719 720 ... 941 942

Commenti su questo manuale

Nessun commento