• 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: Edit NSTokenField's token?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Edit NSTokenField's token?


  • Subject: Re: Edit NSTokenField's token?
  • From: Daniel Ström <email@hidden>
  • Date: Fri, 7 Dec 2007 08:35:38 +0100

25 jul 2006 kl. 14.14.54 skrev Fredrik Olsson:

Mail allows the user to edit a token by double clicking it, or selecting edit from the token's menu.

This behavior is not default for NSTokenField. Searching this mailing list and all mighty Google yields quite a few questions on this topic, but no answers unfortunately :(.

Is there a way to let the user edit an existing token, instead of deleting and retyping?

Tokens are highlighted when hovering the mouse (even when disabled, should this be a bug?), but I can not find a reference in the documentation for how to catch these events, or even selection of tokens. Browsing the NSTokenField and NSTokenFieldCell classes with the F-Script object browser do not reveal any obvious mehods for manipulating individual tokens. Am I missing something obvious, or does not Mail use NSTokenField at all?


// Fredrik Olssn

I have also been looking for an answer to this question, but to no avail. I am currently writing an application where I need this menu to contain categories/properties for the tokens. When I click on the menu for a token, then the token is used as a key into a dictionary, to find the value, which contains the category/property to be changed.


My problem is that I don't get the menu for the token to show up att all. In IB one can right-click on NSTokenFiled or NSTokenFieldCell and connect to a menu, but that doesn't work. I have also implemented tokenField:hasMenuForRepresentedObject: and tokenField:menuForRepresentedObject: in my code, and set that code to be the delegate for the NSTokenField or NSTokenFieldCell. I've tried both of them.

Why is my menu not showing up?

Best regards
Daniel Strom
_______________________________________________

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


  • Prev by Date: Re: How to get the word under the mouse pointer?
  • Next by Date: Re: Edit NSTokenField's token?
  • Previous by thread: How to Implement File Encryption with SSCrypto?
  • Next by thread: Re: Edit NSTokenField's token?
  • Index(es):
    • Date
    • Thread