On Aug 2, 2009, at 11:32, Steve Cronin wrote:

Within the performDragOperation there is a [self setString:newString];
This, unsurprisingly, does NOT update the bindings mechanism.
Is there a way that I can 'flash' the bindings mechanism from within the custom text field or do I need to build out something in the delegate?

You don't say what object 'self' is, or where '[self setString:newString]' is invoked, so any answer you'll get here is pretty much guessing.

If you're trying to get the user interface to update your data model, then you should be calling something like '[textCell setStringValue: newString]' to propagate the change to your data model.

If you're trying to get the data model to update the user interface, then note what the text field is bound to. It's presumably bound to an @"xyz" property of something that represents the dictionary, where @"xyz" is the dictionary key the string is stored under. In that case, the following sequence should generate the KVO notification your text field is looking for:

        [myDictionary willChangeValueForKey: @"xyz"];
        [[myDictionary objectForKey: @"xyz"] setString: newString];
        [myDictionary didChangeValueForKey: @"xyz"];

Is that any help?


_______________________________________________

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 arch...@mail-archive.com

Reply via email to