http://www.newton-inc.com/dev/techinfo/qa/qa.htm
prefsView
and place a reference to the template for your preferences slip there (probably using the NTK GetLayout
function.) When the user selects "Prefs" from the Info button in your application, the NewtApp framework will create and open a view based on the template in the prefsView
slot.theApp
in the preferences view. Use this reference to call the application's GetAppPreferences
method. This method will return a frame containing your application's preferences. GetAppPreferences
is a method provided by NewtApp and should not be overidden.'|Pref1:SIG|
) or create a slot in the preferences frame using your developer signature and save all preferences in that frame. This will guarantee that you don't overwrite slots used by the NewtApp framework. preferencesSlip.viewSetupFormScript := func()
begin
prefs := theApp:GetAppPreferences();
if NOT HasSlot(prefs, kAppSymbol) then
prefs.(kAppSymbol) := {myPref1: nil, myPref2: nil};
end;
SaveAppState
method: preferencesSlip.viewQuitScript := func()
theApp:SaveAppState(); // save prefs
internalStore
. Setting this slot to true
will force the NewtApp framework to save all new items on the internal store.