• 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: dot syntax issue? (Newb Question?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dot syntax issue? (Newb Question?)


  • Subject: Re: dot syntax issue? (Newb Question?)
  • From: Ali Ozer <email@hidden>
  • Date: Thu, 8 Nov 2007 10:06:29 -0800

If the definitions were in perfect sync, it may be fine; I am not sure. There is a chance that Apple's definition may be different, and that will likely cause a conflict, at least at compile time. And in fact, since an @property declaration represents metadata, a difference may lead to a binary incompatibility.
Ali



On Nov 8, 2007, at 09:49 , John Stiles wrote:


On Nov 8, 2007, at 9:44 AM, mmalc crawford wrote:


On Nov 8, 2007, at 9:40 AM, John Stiles wrote:
On Nov 8, 2007, at 9:33 AM, mmalc crawford wrote:
On Nov 8, 2007, at 9:28 AM, John Stiles wrote:
Just a random hypothetical: if one were to add a category on NSStatusItem and implement -enabled (and have it call through to -isEnabled), would that enable dot-syntax for the enabled property?

Why would you do that rather than using properties directly?

@interface NSStatusItem (PropertySupport)
@property (getter=isEnabled) BOOL enabled;
@end

Err, why not? Whatever gets the job done :)

Because you're needlessly adding another method call and hiding information.

Anyway, this looks like a good solution. Why didn't you suggest this in the beginning?

See Ali's reply.


So theoretically, in 10.6 Apply may do something like what you suggested:

@interface NSStatusItem (PropertySupport)
@property (getter=isEnabled) BOOL enabled;
@end

and at that point, if we had done it separately in our own code, it would lead to an error condition?



_______________________________________________

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


References: 
 >dot syntax issue? (Newb Question?) (From: Gregor Brandt <email@hidden>)
 >Re: dot syntax issue? (Newb Question?) (From: mmalc crawford <email@hidden>)
 >Re: dot syntax issue? (Newb Question?) (From: John Stiles <email@hidden>)
 >Re: dot syntax issue? (Newb Question?) (From: mmalc crawford <email@hidden>)
 >Re: dot syntax issue? (Newb Question?) (From: John Stiles <email@hidden>)
 >Re: dot syntax issue? (Newb Question?) (From: mmalc crawford <email@hidden>)
 >Re: dot syntax issue? (Newb Question?) (From: John Stiles <email@hidden>)

  • Prev by Date: Best pattern to follow for scheduling an event
  • Next by Date: Re: How to have an app/window always show up in the visible space
  • Previous by thread: Re: dot syntax issue? (Newb Question?)
  • Next by thread: Re: dot syntax issue? (Newb Question?)
  • Index(es):
    • Date
    • Thread