Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTokenField bug in 10.5.2?



On Feb 13, 2008, at 2:43 PM, Paul Kim wrote:

It appears the behavior of NSTokenField has changed in 10.5.2. It now trims any space around any tokens. This includes plain style tokens (which look just like regular strings).

Are you linking against the 10.4 or 10.5 SDK?

I previously ran into the reverse problem NSTokenField automatically trimmed trailling and leading whitespace in 10.4, so I was surprised to see the spaces appear in 10.5. (And it did represent a binary compatibility problem for my application.)

I've since implemented the appropriate delegate methods to ensure the trimming happens if necessary.

I'm having problems figuring out a workaround as every delegate/ notification method already has the spaces trimmed off before I can get to them.

It appears as though the previous behavior (trimming whitespace) may have been restored using a linked-on-or-after test. My delegate gets trimmed strings if I link against the 10.4 SDK, untrimmed strings if I link against the 10.5 SDK.


Maybe someone from Apple can confirm this.

This behavior preserves binary compatibility with apps written for 10.4 which expected to get the trimmed strings since that is all they were ever sent.

If you support 10.4 you must plan on getting trimmed strings, because that was always the behavior.

If possible, link against the 10.5 SDK, since that seems to get you the behavior you desire on Leopard.

Jim
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSTokenField bug in 10.5.2? (From: Paul Kim <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.