Joy Online Manual
NAME |
objc:newClass - Add a new class to the run-time |
SYNOPSIS |
objc:newClass class superClass ?instanceVariables?
DESCRIPTION |
Adds a new class with a given name as a subclass of a given superClass to the Objective-C run-time environment. The new class inherits all the methods and instance variables from its superClass and may add its own instanceVariables by specifying a list containing alternating types and names (new methods can be added and removed dynamically to any class with the objc:teach command). The added class is indistinguishable from an Objective-C class created by any other means. |
EXAMPLE |
joy> objc:newClass MyButton NSButton {
id sound
id image
}
SEE ALSO |
KEYWORDS |
class, inheritance, instance variables |
Index |