Re: How does @protected work in obj-c?
Re: How does @protected work in obj-c?
- Subject: Re: How does @protected work in obj-c?
- From: Andréas Saudemont <email@hidden>
- Date: Thu, 21 Oct 2004 15:10:52 +0200
Mark,
On Thu, 21 Oct 2004 23:01:12 +1000, Mark Patterson
<email@hidden> wrote:
>
I tried to define a base class with a variable, and have 2 subclasses
>
reference that variable. But I got errors against all the places I
>
referenced the variable. According to that page
>
http://www.otierney.net/objective-c.html @protected is the default
>
visibility. I am used to protected in Delphi meaning visible to any
>
subclass.
What errors do you get? How do you declare your protected variables?
According to Apple's Objective-C specification, @protected means that
"the instance variable is accessible within the class that declares it
and within classes that inherit it," so that's what you're expecting.
Andréas
--
http://andreassaudemont.net/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden