I have a method (regex) that returns an array of strings. In order to deduplicate and manage this array of strings, I am then converting the array into an NSCountedSet. This set is bound as the data source for an array controller, which is bound to a table for display.
The problem, of course, is that the set doesn’t have any keys – just strings. Is there a way to set the Model Key Path in the table bindings to just pull the first (and only) item in the array? I can add key/value pairs, but that requires looping through the whole array, which can be very time consuming.
EDIT: When I say “time consuming,” that’s because I’m using AppleScript’s “repeat with i from 0 to (count of regexResults - 1)…”, which is painfully slow on large arrays/lists.