[Openmcl-devel] change objc class?
Bill St. Clair
wws at clozure.com
Sat Feb 11 10:20:28 CST 2012
Never done it myself, but apparently it's possible, in a limited way,
nothing like CLOS change-class:
obj->isa = [NewClass class];
This only changes the class that receives method calls for that
object; it doesn't change the object's layout in memory. Thus, this is
only really useful when you have a set of classes with the same ivars
(or one with a subset of the others') and you want to switch between
On Sat, Feb 11, 2012 at 11:15 AM, Arthur Cater <arthur.cater at ucd.ie> wrote:
> Is it possible to change the class of an objc instance?
> eg if I defined a subclass of ns-window, with no extra slots,
> could I make an existing window be of that subclass?
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
More information about the Openmcl-devel