http://www.newton-inc.com/dev/techinfo/qa/qa.htmprotoPeoplePicker displayed names as "last, first", but in Newton 2.1 OS it displays "first last". How can I make protoPeoplePicker display the original way?nameRefDataDef for people that will display the name in "last, first" format. The good news is that this workaround will work on both Newton 2.0 and Newton 2.1. The basic steps are:nameRefDataDef that does the right thingdataClass slot of your peoplePicker // create a unique symbol for the the data def
DefineGlobalConstant('kMyDataDefSym,
Intern("nameRef.people.lastFirst:" & kAppSymbol)) ;
DefineGlobalConstant('kMyGetFunc,
func(item, fieldPath, format)
begin
// if this is a person, not a company, modify stuff
local entry := EntryFromObj(item) ;
if fieldPath = 'name AND format = 'text AND entry AND
IsFrame(entry) AND ClassOf(entry) = 'person then
begin
local nameFrame := entry.name ;
if nameFrame AND nameFrame.first AND nameFrame.last then
return nameFrame.last & ", " & nameFrame.first ;
else
return inherited:Get(item, fieldPath, format) ;
end
else
return inherited:Get(item, fieldPath, format) ;
end
) ;
viewSetupFormScript of the base view of your application: // register my modified people data def
RegDataDef(kMyDataDefSym, {_proto: GetDataDefs('|nameRef.people|),
Get: kMyGetFunc}) ;
viewQuitScript of the base view of your application: // unregister my modified people data def
UnRegDataDef(kMyDataDefSym) ;
kMyDataDefSym constant as the value for the dataClass slot of your protoPeoplePicker or protoPeoplePopup