Reputation: 25
I can't create NSRange object in ASOC. I've googled it but with no luck.
I have tried:
current application's NSMakeRange_({0, 1})
current application's NSMakeRange_({location:0, length:1})
current application's NSRange's NSMakeRange_({location:0,length:1})
please help
Upvotes: 0
Views: 172
Reputation: 285180
Too complicated:
set range1 to current application's NSMakeRange(0, 1)
And – since C structs can be represented by AppleScript lists or records – still easier:
set range2 to {location:0, |length|:1}
AppleScriptObjC recognizes the "literal" creation as NSRange
Upvotes: 1