• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How does @protected work in obj-c?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >How does @protected work in obj-c? (From: Mark Patterson <email@hidden>)

  • Prev by Date: How does @protected work in obj-c?
  • Next by Date: Re: NSMutableArray & Pointers
  • Previous by thread: How does @protected work in obj-c?
  • Next by thread: creating a framework, linker troubles
  • Index(es):
    • Date
    • Thread