http://www.newton-inc.com/dev/techinfo/qa/qa.htm
protoStatusTemplate
-based view and am trying to rename the primary button through the protoStatusTemplate
's setup frame. After doing this, I get an exception when I tap on the renamed button. What am I doing wrong?protoStatusTemplate
which will cause the primary button to function incorrectly if you do not include a buttonClickScript
in the setup frame.primary
slot of the values frame of the setup, the primary button uses the text
slot and the buttonClickScript
slot of that frame to initalize itself. Unfortunately, it does not check to see if either of those slots exist before trying to use them. The result is that an exception is thrown when you tap the button.buttonClickScript
to the primary frame. From that method you will typically call your base view's CancelRequest
method.// Add a buttonClickScript method which just calls the application's CancelRequest method.local viewSetValues := { primary: { text: "Stop", buttonClickScript: func() GetRoot().(kAppSymbol):CancelRequest('userCancel) } }; local viewSet := { appSymbol: kAppSymbol, name: "The Name", values: viewSetValues }; // Setup the status templatestatusView:ViewSet( viewSet );