newScriptingObjectOfClass method

ObjCObjectBase? newScriptingObjectOfClass(
  1. ObjCObjectBase objectClass, {
  2. required NSString forValueForKey,
  3. ObjCObjectBase? withContentsValue,
  4. required NSDictionary properties,
})

newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:

Implementation

objc.ObjCObjectBase? newScriptingObjectOfClass(
  objc.ObjCObjectBase objectClass, {
  required objc.NSString forValueForKey,
  objc.ObjCObjectBase? withContentsValue,
  required objc.NSDictionary properties,
}) {
  objc.checkOsVersionInternal(
    'NSObject.newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:',
    iOS: (true, null),
    macOS: (false, (10, 5, 0)),
  );
  final _ret = _objc_msgSend_s92gih(
    this.ref.pointer,
    _sel_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_,
    objectClass.ref.pointer,
    forValueForKey.ref.pointer,
    withContentsValue?.ref.pointer ?? ffi.nullptr,
    properties.ref.pointer,
  );
  return _ret.address == 0
      ? null
      : objc.ObjCObjectBase(_ret, retain: false, release: true);
}