On Mon, Jun 30, 2008 at 5:04 PM, Hamish Allan <[EMAIL PROTECTED]> wrote: > On Mon, Jun 30, 2008 at 3:56 PM, Michael Ash <[EMAIL PROTECTED]> 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]