• 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: Why aren't my bindings firing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why aren't my bindings firing?


  • Subject: Re: Why aren't my bindings firing?
  • From: "Michael Ash" <email@hidden>
  • Date: Mon, 30 Jun 2008 19:56:30 -0400

On Mon, Jun 30, 2008 at 5:04 PM, Hamish Allan <email@hidden> wrote:
> On Mon, Jun 30, 2008 at 3:56 PM, Michael Ash <email@hidden> wrote:
>
>> Although Apple's sample code shows overriding -bind:... to store
>> information about the new binding, it doesn't look like this is
>> necessary. You can simply use -infoForBinding: to obtain the info
>> dictionary, extract the bound object and key, and use that information
>> to update the model object. I'd assume this is what the Apple classes
>> do, and it seems to me to be a lot simpler than overriding -bind:...
>> to stash away a bunch of information that's already being stored for
>> you anyway.
>
> That would seem a pretty reasonable assumption, but it doesn't seem to
> be the case. At least, breakpoints on -[NSTextField infoForBinding:],
> -[NSControl infoForBinding:],  -[NSObject infoForBinding:] don't seem
> to trigger when the text field is edited; nor are messages logged from
> a subclass of NSTextField overriding -infoForBinding:.
>
> Any other ideas, anyone?

Well, this is irrelevant to the question of what *you* should do.
Using -infoForBinding: is simple and it works, so use it.

However, if you're curious about what Apple does, it shouldn't be too
hard to find out. You know one thing that happens reliably: your
model's key is set. So set up a test app, put a breakpoint on the
model's setter, then see what's calling it. The rest should follow
from there.

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

References: 
 >Why aren't my bindings firing? (From: Charles Srstka <email@hidden>)
 >Re: Why aren't my bindings firing? (From: Ken Thomases <email@hidden>)
 >Re: Why aren't my bindings firing? (From: Charles Srstka <email@hidden>)
 >Re: Why aren't my bindings firing? (From: Ken Thomases <email@hidden>)
 >Re: Why aren't my bindings firing? (From: Charles Srstka <email@hidden>)
 >Re: Why aren't my bindings firing? (From: "Hamish Allan" <email@hidden>)
 >Re: Why aren't my bindings firing? (From: Charles Srstka <email@hidden>)
 >Re: Why aren't my bindings firing? (From: "Hamish Allan" <email@hidden>)
 >Re: Why aren't my bindings firing? (From: "Michael Ash" <email@hidden>)
 >Re: Why aren't my bindings firing? (From: "Hamish Allan" <email@hidden>)

  • Prev by Date: Table view tab order problem
  • Next by Date: Re: Why aren't my bindings firing?
  • Previous by thread: Re: Why aren't my bindings firing?
  • Next by thread: Re: Why aren't my bindings firing?
  • Index(es):
    • Date
    • Thread