background image
C H A P T E R 2 4
Built-in Communications Tools
AppleTalk Functions
24-15
The following is an example that shows the use of this function:
ChooserSample := {
// open network connection
openNetworkScript: func()
begin
GetRoot().NetChooser:openNetChooser(nil,"=:LaserWriter@",ni
l, self, "Use printer, sir", "Printer", "printers");
end,
// called when the user selects an item
networkChooserDone: func(currentSelection, currentZone)
begin
Print("Current Selection =" && currentSelection);
Print("Current Zone =" && currentZone);
end
};
The following is an example of running this code in the inspector:
ChooserSample:OpenNetworkScript()
#1A TRUE
// select the network entity, close the Chooser
"Current Selection = Idiot Savante"
"Current Zone = RD1/NewHaven-LocalTalk"
The NetChooser methods are described in detail in "NetChooser Methods"
(page 21-81) in Newton Programmer's Reference.
© 2007-1970, o7 studio » при воспроизведении материала сайта ссылка обязательна