Re: dot syntax issue? (Newb Question?)
Re: dot syntax issue? (Newb Question?)
- Subject: Re: dot syntax issue? (Newb Question?)
- From: Gregor Brandt <email@hidden>
- Date: Thu, 08 Nov 2007 10:36:39 -0700
Ok, that makes sense. I had assumed that all apple supplied libraries
would allow the use of the dot-syntax and properties....silly me.
Gregor
On 8-Nov-07, at 10:23 AM, mmalc crawford wrote:
On Nov 8, 2007, at 9:08 AM, Gregor Brandt wrote:
statusItem.menu = mainMenu; // works fine
statusItem.enabled = YES; // error: request for member
'enabled' in something not a structure or union
statusItem.highlightMode = YES; // works fine
NSStatusItem defines:
- (BOOL)isEnabled;
(not -enabled).
Can someone explain to me why enabled does not exist in the
NSStatusItem.h
The implementors chose to store the information somewhere else.
The implementation detail should not be a concern to you -- you
should be using the public API (maintaining encapsulation).
and why NSStatusItem.h does not use @property for its properties?
It precedes the introduction of properties. Most classes have not
been retrofitted.
In general, you are encouraged to use the dot syntax only with
actual properties...
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden