Inheriting a problem
Inheriting a problem
- Subject: Inheriting a problem
- From: "Mike O'Connor" <email@hidden>
- Date: Mon, 06 Jan 2003 20:04:47 -0500
This is probably a newbie question as I am relatively new to Cocoa but
an example of the problem I'm getting is: Say I have a class UpperClass
and a class that inherits from it, LowerClass. LowerClass has a method
LowerMethod I want to call, but the object I have says it is an
UpperClass. So if I try to call LowerMethod on it, I get an error that
it does not recognize the selector.
I tried casting it [(LowerClass*)theObject LowerMethod] but this
doesn't work. I also tried assigning the pointer to it to a pointer
defined as LowerClass but the dubugger shows it "isa" UpperClass and I
get the same error. Is there something else I should try? I believe my
object really is a LowerClass, but the system is passing it as an
UpperClass - unless I must be wrong about that? TIA
_______________________________________________
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.