http://www.newton-inc.com/dev/techinfo/qa/qa.htm
protoListPicker
, protoPeoplePicker
, protoPeoplePopup
, or protoAddressPicker
?protoListPicker
. That means that the particular class of nameRef you use must include single selection. In general, this requires creating your own subclass of the particular name reference class.protoListPicker
variant will view. That data definition will include the singleSelect
slot. As an example, suppose you want to use a protoPeoplePopup
that just picks individual people. You could use the following code to bring up a protoPeoplePopup
that only allowed selecting one individual at one time: // register the modified data definition RegDataDef('|nameref.people.single:SIG|, {_proto: GetDataDefs('|nameRef.people|), singleSelect: true}); // then pop the thing protoPeoplePopup:New('|nameref.people.single:SIG|,[],self,[]); // sometime later UnRegDataDef('|nameref.people.single:SIG|);
For other types of protoListPickers
and classes, create the appropriate subclass. For example, a transport that uses protoAddressPicker
for emails might create a subclass of '|nameRef.email|
and put that subclass symbol in the class
slot of the protoAddressPicker
.installScript
and removeScript
by registering your dataDef only for the duration of the picker. That would mean registering the class just before you pop the picker and unregistering after the picker has closed. You can use the pickActionScript
and pickCanceledScript
methods to be notified when to unregister the dataDef.