Re: [Pyobjc-dev] objc classes
Brought to you by:
ronaldoussoren
From: Helge H. <hel...@op...> - 2004-05-29 13:59:10
|
On May 29, 2004, at 7:35, Ronald Oussoren wrote: >>> Further, would it possible to change the class hierarchy of an >>> existing class? So that MyFormatter initially inherits from say >>> NSFormatter and after reloading a Python module inherits from >>> NSDateFormatter. Would that be possible with the Apple ObjC runtime >>> or is this already possible with PyObjC? > It is not possible with PyObjC. It might be possible with the Apple > ObjC runtime, but would be pretty hard using the GNUstep runtime (that > one definitely maintains a list of subclasses). Well, the question is what the list of subclasses is actually used for. I'm mostly concerned about "live editing" during development, ala fix&continue, where the superclass changes (so hacks are great as well ;-). If some subclass reflection doesn't work, it should be acceptable I guess. Hm, I just wonder whether posing is just that or helps here? > This limitation may be liften in a future version of PyObjC. Reloading > can be useful during development. Exactly. I'm just thinking about development time where one has typed in a scripted class in some editor and then rethinks about the superclass. Greets, Helge -- http://docs.opengroupware.org/Members/helge/ OpenGroupware.org |