Re: NSTokenField bug in 10.5.2?
Re: NSTokenField bug in 10.5.2?
- Subject: Re: NSTokenField bug in 10.5.2?
- From: Paul Kim <email@hidden>
- Date: Wed, 13 Feb 2008 17:30:33 -0500
On Feb 13, 2008, at 4:36 PM, Jim Correia wrote:
Playing with your app as is, but changing the token style to the
rounded style seems to also avoid the problem. (Which I understand
may not be practical depending on your usage.)
I'm actually using a combination of the plain and rounded ones. It's
just that the rounded ones don't get created by typing, but have to be
dragged in from the non-editable token fields below (like a palette).
The appearance to the user is text with tokens embedded within in.
Your example is currently targeting the 10.4 SDK. If you re-target
10.5, and then supply this no-op delegate method, the spaces appear
to be preserved.
- (id)tokenField:(NSTokenField *)tokenField
representedObjectForEditingString:(NSString *)editingString;
{
NSLog(@"Editing string = \"%@\"", editingString);
return editingString;
}
That seems to do the trick (still testing it on different versions).
Technically, I guess it's not a no-op since omitting the method does
change its behavior. You'd think this would be the default behavior if
your delegate doesn't implement the method. Many thanks (and beers if/
when we cross paths)!
My issue with NSTokenField is not so much the specific problems but
the fact that the problems keep shifting and it's a bit tiring keeping
up with the workarounds.
Thanks again,
Paul Kim
------------------------------------
Chief Noodler - Noodlesoft
email@hidden
http://www.noodlesoft.com
_______________________________________________
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