ObjCObject.set
Set a value through native key-value coding.
js
object.set(key, value)Arguments
| Argument | Type | Meaning |
|---|---|---|
key | string | Nonempty KVC key. |
value | any | Supported native argument. |
Returns
This proxy.
Example
js
const dictionary = ObjC.create("NSMutableDictionary");
try {
dictionary.set("message", "Hello");
console.log(dictionary.toJS());
} finally { dictionary.release(); }Notes
Start with Objective-C step by step. Here, object means a proxy returned by ObjC/RemoteObjC, not a global named ObjCObject.