Re: Subclassing NSTokenField to change behavior
Re: Subclassing NSTokenField to change behavior
- Subject: Re: Subclassing NSTokenField to change behavior
- From: "Iain Delaney" <email@hidden>
- Date: Sat, 18 Aug 2007 10:01:22 -0400
As far as I know, sub-classing NSTokenField won't work for what you
want. After a lot of messing about with NSTokenField I ended up
rolling my own. If you download a copy of Horizon from my site, you
can see the fruits of my labours. The trick is to sub-class
NSTextField, and enable it for attributed strings. The tokens in the
text field are images as RTF attachments.
> Date: Sat, 18 Aug 2007 10:32:22 +1000
> From: Aaron Wallis <email@hidden>
> Subject: Subclassing NSTokenField to change behavior
> To: email@hidden
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> Hi there,
>
> There's very little documentation out there on the interwebs on
> NSTokenFields and how to subclass them.
> I was wondering if anyone has had any luck: Changing the colour of the
> token depending on something (so you could say, have one thats blue
> and another thats green) and altering hits drag and drop behaviour, so
> that when you drag a token away from the field, it removes the
> original vs. making a copy
>
> Many thanks in advance.
>
> - Az
_______________________________________________
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