I’m working on a script with a basic UI, and am trying to use Glyphs callbacks for
Using the basic export callback demo, I can add my custom callback function for
DOCUMENTOPENED. But I cannot remove the callback function with
.removeCallback(). I’ve tried both of these options:
Glyphs.removeCallback( myCustomCallback )
Glyphs.removeCallback( myCustomCallback, DOCUMENTOPENED)
Neither seem to work—my callback function continues to run when a new doc opens. I’ve even tried
del myCustomCallback to remove my callback function entirely, but it continues to run when a doc opens!
I’m assuming that it’s important to have a
removeCallback for any
addCallback. Is that true? How critical is it? If my script hits an error/exception and stops working, will Glyphs have any trouble with a callback I added? Please describe how I should add and remove callbacks responsibly. Thanks!