質問

I found the following bug for NSTokenField, on OSX 10.9.

I would like to know if there is also this bug on OSX 10.8 and if you can reproduce the bug on OSX 10.9.

An xcode project showing the bug is available at this link.


Here is what I did. The screen:

enter image description here

(the textField is a NSTokenField)

Then, in a delegate for this NSTokenField, put the following code

- (NSArray *)        tokenField:(NSTokenField *)tokenField
        completionsForSubstring:(NSString *)substring
                   indexOfToken:(NSInteger)tokenIndex
            indexOfSelectedItem:(NSInteger *)selectedIndex
{
    return @[@"Jojo!!"];
}



- (id)                        tokenField:(NSTokenField *)tokenField
       representedObjectForEditingString:(NSString *)editingString
{
    return @"Jojo the cat" ;
}




- (NSString *)              tokenField:(NSTokenField *)tokenField
     displayStringForRepresentedObject:(id)representedObject
{
    return @"Jojo" ;
}

You'll see, it bugs. It's too slow.

役に立ちましたか?

解決

I checked with other users. It's a bug, and it's filed.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top