Accessing layer and associatedMasterId in remote script / Core API

Try glyph.layers[master.id].

It would be glyph.layerForId_(master.id) but using the wrapped function is better

when using glyph.layerForId_(master.id()) i get:

objc.error: NSInternalInconsistencyException - decodeObjectForKey: class “GSLayer” not loaded

Does using the wrapperd function not work?

Remove the () after id.

If I remove () I get:

print(glyph.layerForId_(master.id))
File “/venv/lib/python3.10/site-packages/objc/_pycoder.py”, line 549, in pyobjectEncode
rv = reduce(2)
TypeError: cannot pickle ‘objc.native_selector’ object

Does using the wrapped function not work?

not for me on a “remote” script.

The remote scripts do not support the wrapper. I try to have a look at it tomorrow.

I had a look and improved it a bit. It doesn’t error out any more.

1 Like

The fix was shipped on yesterday latest cutting edge release?

No. Fixed it after the update.