NSTokenField bug in 10.5.2?
NSTokenField bug in 10.5.2?
- Subject: NSTokenField bug in 10.5.2?
- From: Tom Bunch <email@hidden>
- Date: Mon, 10 Mar 2008 15:00:58 -0700
Hey developers,
I've been grappling with a problem very similar to this month's
earlier thread with the same subject line. The consensus there was
that in 10.4 NSTokenField always trims off whitespace before the
input it tokenized. In fact, my experience is the opposite. In
OmniPlan we have an interface much like the custom formats in System
Preferences -> International -> Formats – you can drag in tokens and
add text to delimit between them. Built against the 10.4 SDK and run
on 10.4, this accepts spaces in the token field and passes them on to
me, but when the same binary is run on Leopard, the spaces are just
gone. You get dates like "January2008", unless you delimit w/ non-
whitespace.
I've cobbled together a very simple test app and put the source up at
http://people.omnigroup.com/tom/NSTokenField.zip. It just
prepopulates an NSTextField w/ a couple of tokens and logs the
objectValue if you edit the field.
Run this on Tiger, put some spaces in between tokens and hit tab, you
get a log like this:
2008-03-10 14:03:16.929 NSTokenField[239] token field objectValue =
(<Token: 0x343f60>, " ", <Token: 0x344140>)
On Leopard, you get:
2008-03-10 14:03:16.929 NSTokenField[239] token field objectValue =
(<Token: 0x343f60>, <Token: 0x344140>)
This is pretty easy to fix if I target 10.5, but this build needs to
target 10.4 and hopefully still behave on 10.5.
In the earlier thread, Aki Inoue confirmed that:
The logic to determine whether or not to apply the auto whitespace
trimming is:
- trims if linked against 10.4.x binary
That seems to be true... linked against 10.4 and run on 10.5, but
it's not consistent with the behavior linked against 10.4 and run on
10.4, so it doesn't really solve the binary compatibility problem.
Any suggestions for a workaround would be appreciated!
Thanks!
-Tom Bunch
Omni
_______________________________________________
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