dot syntax issue? (Newb Question?)
dot syntax issue? (Newb Question?)
- Subject: dot syntax issue? (Newb Question?)
- From: Gregor Brandt <email@hidden>
- Date: Thu, 08 Nov 2007 10:08:10 -0700
Hello,
I am new at Objective-C and Cocoa and have a quick question about the
includes. The following codes gives me the error noted in the comment:
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
I notice that enabled is not defined in NSStatusItem.h and that is the
reason for the error, when I change the code to:
statusItem.menu = mainMenu;
[statusItem setEnabled:YES];
statusItem.highlightMode = YES;
I don't get the error. This seems to be a hole in the dot syntax in
objective-c 2.0. To me it seems odd that I can use dot syntax on some
properties and not others.
Can someone explain to me why enabled does not exist in the
NSStatusItem.h and why NSStatusItem.h does not use @property for its
properties?
Thanks,
Gregor
_______________________________________________
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