Inheritance in ObjB

Coding Questions, IDE related or anything else

Inheritance in ObjB

Postby udo.killermann » Sat Nov 27, 2010 7:58 am

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
--------------
MacBook (2GHz, 4 GByte) - Lion (10.7.3)
started Objective Basic coding in April 2010 - still enjoy it ;-)
udo.killermann
 
Posts: 247
Joined: Thu Apr 08, 2010 6:46 am
Location: Hannover, Germany

Re: Inheritance in ObjB

Postby udo.killermann » Sun Nov 28, 2010 8:07 pm

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
--------------
MacBook (2GHz, 4 GByte) - Lion (10.7.3)
started Objective Basic coding in April 2010 - still enjoy it ;-)
udo.killermann
 
Posts: 247
Joined: Thu Apr 08, 2010 6:46 am
Location: Hannover, Germany


Return to Objective-Basic (Xcode 3)

Who is online

Users browsing this forum: No registered users and 2 guests

cron