Last week I mentioned that NSTokenFieldCell was working OK for me. After testing more thoroughly I need to correct the record. As stated in the Release Notes for Mac OS 10.4, there are issues using NSTokenFieldCell in an NSTableView. I found the following results testing with Mac OS 10.5.

* Using dataSource, displaying tokens:  Works OK.

* Using bindings, displaying tokens:  Works OK.

* Using dataSource, editing tokens: Works OK as long as there is a token already in the cell. Clicking on the token will open the field editor and allow tokens to be added or deleted. But if there is not at least one token to begin with, you can click all day and nothing happens.

* Using bindings, editing tokens: Clicking on the cell always opens the field editor, but when editing is ended the bound-to object gets a setFoo: message with parameter equal to an empty array, thus removing all Foo objects in the array in the data model.

* Although setEditable:NO does disable editing as expected, neither setEditor:NO no setEnabled:NO seems to change the appearance of the cell to the expected "grayed out" look.

I tried to work around the issue by getting the window's first responder. With bindings it turned out to be a kind of Text View object which was definitely the field editor for the column. It was promising, but I was unable to find any message I could send it which would return the tokens :(

_______________________________________________

Cocoa-dev mailing list ([email protected])

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