Hello,
I have a script that create a window and put some NSTokenField and NSComboBox into it, displays it with runModalForWindow and then retrieve results.
The NSComboBox has a List of strings that is used for the autocomplete.
All fine expect that the autocomplete is case sensitive.
(It’s a standard script built with Script Debugger)
set theCombo to (NSComboBox’s alloc()'s initWithFrame:{{theLeft, theBottom}, {theWidth, 26}})
theCombo’s addItemsWithObjectValues:LaList
theCombo’s setCompletes:true
theCombo’s setHasVerticalScroller:true
set theCombo’s numberOfVisibleItems to 20
The question is what to do to make it case insensitive.
I guess I have to use a Datasource that has a case attribute but I don’t know how to implement that starting from my list of strings (LaList)
Could someone show me the code needed to create a datasource from the list, make it behave case insensitively and bind it to the field.
I know it probably involve implementing comboBox:completedString but I don’t know how to transform that into ASObj-c code in my script.
I have a secondary question.
My Textfields have the default inherited capabilities so they can use the clipboard via the contextual menu. But the standard keyboard equivalents are not handled.
(Actually they are if the script is run from Script debugger but not when run from the Script menu)
Is it a matter of implementing a text field delegate. ?
on control:theControl textView:theTextView doCommandBySelector:theSel
?
What should I add to implement COMMAND-x , COMMAND-c and COMMAND-v in my textfields. ?
In advance, thank you.