Routing

The Action Button

If you're using NewtApp, you've already got an Action button (newtActionButton) in your status bar. If you are not using newtApp, you'll use a protoActionButton instead. Either Action button's protos require three slots (somewhere in the parent hierachy) in order to operate:

appSymbol
Symbol. The application symbol (kAppSymbol). This is required by NewtApplication anyway.

target
Frame. The current soup entry. This is maintained by NewtApplication.

targetView
Frame. The view which contains the target. It is also maintained by NewtApplication.

That's all there is to making sure an Action button appears in the application. Getting items in the button is a different matter. Let's handle the route scripts first.


Note:Actually, the Action button sends itself the GetTargetInfo message which returns the target and targetView. The default version of this method (in the root view) looks for these values in the target and targetView slots, using parent inheritance. You can override this root view method to obtain these values in some other way.


An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.

Last modified: 1 DEC 1996