• 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: NSTokenField - workaround for paste or drop vs. beginEditing and bindings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: NSTokenField - workaround for paste or drop vs. beginEditing and bindings?
      • From: Jim Correia <email@hidden>
References: 
 >NSTokenField - workaround for paste or drop vs. beginEditing and bindings? (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: dynamic GUI, how to?
  • Next by Date: Re: dynamic GUI, how to?
  • Previous by thread: NSTokenField - workaround for paste or drop vs. beginEditing and bindings?
  • Next by thread: Re: NSTokenField - workaround for paste or drop vs. beginEditing and bindings?
  • Index(es):
    • Date
    • Thread