• 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: @dynamic and Programmatic Access to Setters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @dynamic and Programmatic Access to Setters


  • Subject: Re: @dynamic and Programmatic Access to Setters
  • From: Mike Rossetti <email@hidden>
  • Date: Thu, 17 Apr 2008 21:47:59 -0600

Hi Jack,

Thanks for the reply!

On Apr 17, 2008, at 9:26 PM, Jack Repenning wrote:
On Apr 17, 2008, at 8:15 PM, Mike Rossetti wrote:
Bindings clearly work so I'm surprised the setTipName isn't synthesized and available for my use.

You haven't given us enough info to be sure that tipName works in any sense, prior to your added class method that you mention. So when you say "binding works," I don't know if that means anything more than "no one actually complains."

I was just trying not to be too long-winded, which is my natural tendency. ;^)


What I meant is that I've got a Cocoa Core-Data Document-based application where I bring up a new document, edit a new Tip, including setting the tipName, save that document, re-open that document, and the tipName is still there. Inspecting the XML version of the document file shows the tipName field with the string as I typed into the field in the UI.

As I understand it, @dynamic is different from @synthesize. While @synthesize actually ... well ... synthesizes the accessor definitions, @dynamic only promises that someone else will; it's sorta like "@class", meaning "pretend you saw the definitions; trust me!" If you don't ever actually provide the definitions, then they never actually exist, and that of course turns ugly once you start trying to use them (or copy them to the clipboard).

Yes, that's my understanding. But according to the comments I mentioned in my earlier message, Core Data provides the implementations. And clearly it does since I can edit, save and restore the document. I'm just missing the 'magic' that tells me how to set/get a property being managed by Core Data.


Mike

_______________________________________________

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


  • Follow-Ups:
    • Re: @dynamic and Programmatic Access to Setters
      • From: Paul Goracke <email@hidden>
    • Re: @dynamic and Programmatic Access to Setters
      • From: Jack Repenning <email@hidden>
References: 
 >@dynamic and Programmatic Access to Setters (From: Mike Rossetti <email@hidden>)
 >Re: @dynamic and Programmatic Access to Setters (From: Jack Repenning <email@hidden>)

  • Prev by Date: Re: @dynamic and Programmatic Access to Setters
  • Next by Date: Re: Unregistering KVO observers
  • Previous by thread: Re: @dynamic and Programmatic Access to Setters
  • Next by thread: Re: @dynamic and Programmatic Access to Setters
  • Index(es):
    • Date
    • Thread