http://www.newton-inc.com/dev/techinfo/qa/qa.htm
RegGlobalKeyboard
function.GetUserSettings
, SetDefaultUserSettings
and SetUserSettings
allow you to manipulate recognition-related user preference data. These functions can allow an application to keep and manage recognition settings for multiple users. These functions only manage information about the recognition settings, and no other user preference settings. GetUserSettings()
This function returns a frame of the current user recognition settings; this frame is the argument for SetUserSettings
. Do not modify the frame this function returns. Do not rely on any values, as the frame may change in future releases. SetDefaultUserSettings()
This function sets recognition-related user preference settings to default values. SetUserSettings(savedSettings)
savedSettings - Recognition preferences frame returned by GetUserSettings
.local correctView := GetRoot().correct;if correctView and (GetCaretBox() or GetHiliteOffsets()) then correctView:Open();
Note: An older version of this Q&A (from 12/8/95) showed using GetKeyView
as a test to make sure a correctable view was the key view. With the changes to the OS with the Newton 2.1 release that allow any view to be a key view, this is no longer a reliable test. The corrector will fail to open (generating a -48204 "bad path" error) if the key view does not support the caret or a selection. Calling GetCaretBox
and GetHiliteOffsets
is a more reliable test to see if a correctable view is available.