Creating and Using User Protos

How NTK Handles User Protos

NTK has no way of knowing what kind of custom user proto you are creating. It can't read your mind to find out whether this is the type of proto that should have its viewBounds slot overridden or not. Since NTK can't know, it simply doesn't do anything--no slots are added to templates protoing from user protos. Thus, all user protos inherit all of their slots (except the _proto slot) from the proto. You simply have to take the additional step and add a viewBounds slot into the templates you want to move or resize.

However, if the user proto has no viewBounds, NTK doesn't know where to display the template. It therefore adds a viewBounds to the template to deal with the situation.


Note:Any template without its own viewBounds slot can't be moved or resized graphically. It does not matter whether it protos from a system or user proto. You can even mimic this effect with templates based upon protoStaticText. Just remove the viewBounds slot from the template; like magic you can no longer move it around.


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

Last modified: 1 DEC 1996