i would like to use a subclass of NSFormatter with a NSTokenField. i've discovered that the partial string passed to

-isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:

consists of zero or more unicode object replacement characters (\ufffc) as "place holders" and the text for the token currently being edited (where the place holder characters represent other tokens before or after the token being edited), this is undocumented and thus i'm concerned about making this assumption. however, if i do use this assumption, i can get this method to do what i want.

but... i haven't been able to figure out what to return (directly or by reference) from any of the following methods:

- (NSAttributedString *)attributedStringForObjectValue:(id)anObject withDefaultAttributes:(NSDictionary *)attributes

- (NSString *)editingStringForObjectValue:(id)anObject

- (BOOL)getObjectValue:(id *)anObject forString:(NSString *)string errorDescription:(NSString **)error

i have the following 2 main problems (and a few other minor problems, which probably stem from these 2):

1) i can't get a field that has more than one token to display properly when double clicked (to be edited)

2) if i attempt to add a new token to a field that already has one or more tokens, instead of adding the token, it replaces any/all existing tokens with the new one

anyone know if it is possible to use a custom formatter with NSTokenField? if so, could you possibly please give me some pointers (to code or documentation) or advice?

thanx,
ken

ps. i've aleady searched the archives and haven't found any relevant info
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to