background image
C H A P T E R 2 4
Built-in Communications Tools
AppleTalk Functions
24-13
The Net Chooser
24
The Newton system provides a NetChooser as part of the root view. The Net
Chooser is similar in operation to the Mac OS Chooser. You can use the function
GetRoot().NetChooser:OpenNetChooser
to display a list of network entities
from which the user can make a selection. This function is declared as follows:
NetChooser:OpenNetChooser(
zone
,
lookupName
,
startSelection
,
who
,
connText
,
headerText
,
lookforText
)
The
OpenNetChooser
method displays the NetChooser view on the user's
screen. The following is an example that shows the use of this function:
GetRoot().NetChooser:openNetChooser(nil,"=:LaserWriter@",ni
l, self, "Use printer, sir", "Printer", "printers");
This example opens the NetChooser view and displays the lookforText string while
the search is in progress, as shown in Figure 24-2 (page 24-14).
Table 24-8
AppleTalk functions
Function
Description
OpenAppleTalk
Opens the AppleTalk drivers.
CloseAppleTalk
Closes the AppleTalk drivers.
AppleTalkOpenCount
Returns the open count for the AppleTalk drivers.
HaveZones
Returns
true
if a connection exists and zones are
available. Returns
nil
if there are no zones.
GetMyZone
Returns a string naming the current AppleTalk zone.
GetZoneList
Returns an array containing strings of all the existing
zone names
GetNames
Returns the name for a network address or an array
of names for an array of network addresses.
GetZoneFromName
Returns the zone name for a network address.
NBPStart
Begins a lookup of network entities.
NBPGetCount
Returns the number of entities the currently running
NBP lookup has found.
NBPGetNames
Returns an array of names found by
NBPStart
.
NBPStop
Terminates a lookup started by
NBPStart
.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна