Page 1 of 1

Inheritance in ObjB

PostPosted: Sat Nov 27, 2010 7:58 am
by udo.killermann
Board,

I don't see traditional inheritance in ObjB at work. If I use NSButton objects I expect to find every method and property of its superclasses (as documented in the help file) as well. But this is not the case. I have to declare these for the derived class just I would do to introduce a formerly unknown class to ObjB.

On the other hand if I derive my class from an ObjB base class (e.g. NSWindow) and I want to use methods and properties of the superclasses I have to deal with the same issues.

I can handle this issues within my code but I'd expect the compiler to handle it for me.

Am I missing something?
Udo

Re: Inheritance in ObjB

PostPosted: Sun Nov 28, 2010 8:07 pm
by udo.killermann
Board,

obviously I was mistaken for the first part of my statement because of the IDE's auto completion feature. If I use a subclass only subroutines and functions added for this class are listed. The parent's method and property inventory isn't shown although these methods and properties can be used without a problem. It took me a while to recognize that I can read the string value of a NSTextField instance using its StringValue property which is inherited from NSControl - there is no hint to this besides the documentation.

Kind regards
Udo