https://github.com/uliwitness/objc/releases/
This takes a bit of learning to do right, but if you're a seasoned SuperCarder and think about making the step to making your own XCMDs, this might be a good starting point.
As an example, if you wanted to keep lists of arbitrary strings, but can't set aside any character as an item delimiter, the code could look something like:
- Code: Select all
framework "Foundation"
put objc("NSMutableArray","new") into theArray
repeat with x = 1 to 10
put objcstr("My text,more text"&return&"even more text" && x) into cocoaString
get objc(theArray,"addObject:",cocoaString)
end repeat
put objc(theArray,"count") into numItems
repeat with x = 1 to numItems
put objc(theArray,"objectAtIndex:",x-1) into cocoaString -- -1 because Cocoa counts from 0.
answer scstr(cocoaString)
end repeat
-- and once we're done with this array
get objc(theArray,"release")
You can get more info that helps understanding what this example does from Apple's documentation of NSMutableArray and NSArray: https://developer.apple.com/library/mac ... ectAtIndex: