Curious about how to enable OSAAppleScriptObjCEnabled

I noticed several references in older Applescript books (not that there are newer ones I could locate) to enabling Objective-C lib support via script editor.

The check box mentioned in the script bundle draw appears to have been removed, as it’s not in the current version of script editor.

I tried manually editing my library plist and adding the key/value pair for OSAAppleScriptObjCEnabled, but the app fails when calling the example code shown below.

Is it still possible to do this? If so, please point me to any posts/tutorials detailing how it’s done now.

TIA

From Shane’s Lib Tutorial

on textReplace(sourceText, searchText, replaceText)
	set cocoaString to current application's NSMutableString's stringWithString:sourceText
	cocoaString's replaceOccurrencesOfString:(searchText as string) withString:(replaceText as string) options:(current application's NSCaseInsensitiveSearch) range:{0, (cocoaString's |length|())}
	return cocoaString as Unicode text
end textReplace

Thanks, that did it.