Glyphs SDK: Python Selection Tool template

I’m trying a selection tool template, but it gives me this error in the default state.

Traceback (most recent call last):
File “”, line 54, in mouseDown_
loc = self.editViewController.graphicView.getActiveLocation_(theEvent)
AttributeError: ‘objc.native_selector’ object has no attribute ‘graphicView’

I can print theEvent fine, so that doesn’t seem to be the problem. Could anyone help me troubleshoot this?

I solved the part by changing this
to this
but I am not sure if this is intended.

After that, I am struggling with the dragging part. This particular line
offset = subtractPoints(mousePosition, self.draggStart)
gives me an error:
File “GlyphsApp/GlyphsApp/”, line 12014, in subtractPoints
TypeError: ‘objc.native_selector’ object is not subscriptable


Note the parentheses,

Every time you see this, you missed some parentheses.

“I” didn’t make the typo, the template did.
And what about the dragging part?

The same thing. Add parentheses.

Ah. Sorry, didn’t get it.