Obj C - Inheritance
Obj C - Inheritance
- Subject: Obj C - Inheritance
- From: Alan leigh <email@hidden>
- Date: Thu, 26 Sep 2002 22:28:32 +1000
Coming from a C++ background, it feels like I should do the following:
Abstract Base Class
- Abstract methods
Concrete Sub Class
- Implement methods
Then I can fill an array with pointers to the base class and be assured
of their functionality. Is this the 'done' thing in Obj C? Or do I just
do this...
Base Class (which I still pretend is abstract)
- General purpose methods
Sub class (which i actually make)
- Implement methods
and then rely on the fact I wont do anything silly and produce a run
time error? I hope that makes sense. It seems to me to be very bad
coming from C++ to do that, but also very easy :) i.e. I can just use
NSMutableArray addObject and then loop through, trusting that my code
has only added classes which have the thing I wanna do?
Cheers All
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.