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

tcl> objc:newClass MyButton NSButton {
id sound
id image
}

SEE ALSO

objc:info
objc:teach

KEYWORDS
class, inheritance, instance variables

Index