Re: NSTokenField - workaround for paste or drop vs. beginEditing and bindings?
Re: NSTokenField - workaround for paste or drop vs. beginEditing and bindings?
- Subject: Re: NSTokenField - workaround for paste or drop vs. beginEditing and bindings?
- From: "Justin R. Miller" <email@hidden>
- Date: Tue, 13 Jun 2006 16:19:49 -0400
On Jun 13, 2006, at 12:53 PM, Jim Correia wrote:
When pasting or dropping into an NSTokenField, the control skips
calling the delegate methods and doesn't send the usual text
notifications. This has the side effect of
- not marking the document dirty when the edit starts
- not committing the value (via bindings) when the edit ends if the
past or drop was the only edit
rdar://problem/4583947
Does anyone have a ready workaround?
If you implement:
- (NSArray *)tokenField:(NSTokenField *)tokenField readFromPasteboard:
(NSPasteboard *)pboard
in your NSTokenField's delegate, you can dirty the document there
with the main window's setDocumentEdited: method. I imagine you could
do similar things with the bindings as well.
--
Justin R. Miller
Code Sorcery Workshop
http://codesorcery.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden