Re: is protected broken, or am I?
Re: is protected broken, or am I?
- Subject: Re: is protected broken, or am I?
- From: Cameron Hayne <email@hidden>
- Date: Thu, 10 Oct 2002 17:55:52 -0400
On 10/10/02 5:24 pm, "matt neuburg" <email@hidden> wrote:
>
I don't want to put the code for this alternate behavior into MyClass. I'd
>
like to put it into some other class and have an instance of that other class
>
step into MyClass's coat, as it were, taking on all the outlets, and being
>
pointed to by all the window stuff, that the MyClass instance already is set
>
up with in the nib.
>
This is why I thought of a subclass of MyClass. If there is a better
>
architecture for accomplishing this, I'd be glad to hear it.
What you have said above is (as far as I understand) all to the good.
If you have an instance of MySubClass, it has full access to all the ivars
that were defined in MyClass.
But what you had previously written about was code where your instance of
MySubClass had a pointer to some other (who knows what it was) instance of
MyClass and you were trying to access ivars of that other instance.
Why did you introduce that other instance and what was it for? Doesn't seem
necessary at all. An instance of a subclass *IS* an instance of the
superclass - it does not contain an instance of the superclass. Probably you
need to explain in more detail about what you are trying to do.
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
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.