I have just written some LCB code that crashes Livecode. I needed to convert a string into an NSString object but for some reason I initially did not spot the built in conversion.
So I attempted to use these to handlers:
Code: Select all
-- Need to be able to create an NSString object
private foreign handler ObjC_NSStringAlloc() \
returns objcRetainedID \
binds to "objc:NSString.+alloc"
private foreign handler ObjC_NSStringInitWithString(in pObj as ObjcID, in pString as String) \
returns objcID \
binds to "objc:NSString.-initWithString:"