Syntax
[1]
subclass
view tag, ...
[2]
subclass view tag, ...
[3]
view subclass tag, ...
Description
Use the subclass statement to create a subclass of a window or widget. Subclassed windows or widgets trigger additional dialog events such as mouseDown, keyDown, etc. The subclass keyword should be placed somewhere before or immediately after a window or widget keyword.
When the FB translator encounters the subclass keyword, it sets an internal flag to say "subclass the next window or widget that's created". Therefore, be careful where you put subclass. For example, don't do this:"
window 1
button 1,,,, (13,200,80,32)
subclass // don't put this here
// do something ...
long i
for i = 1 to 10
// ...
next
textfield 2 // this will be subclassed
Note
To subclass a nib object, change the object's class name in the Identity Inspector. For example, to subclass a nib textfield, set its class name to "TextFieldSC". Note: Class names are case-sensitive and are made up of the widget name plus "SC" suffix.