Glyphs crash when editing NSTextField in List

It seems something goes wrong when I try to edit an NSTextField inside a List.
After the first edit, I receive this notification:

Screenshot 2024-03-15 at 14.32.32

Btw, If press Enter or Tab, it causes Glyphs to crash.
I have sent some crash reports.

This only happens in Glyphs; with the same code using Python scripts with Vanilla or DrawBot, there are no problems.

Here is a snippet to test :

from vanilla import Window, List
from AppKit import*

class TestDemo:

    def __init__(self):
        self.w = Window((400, 100))
        self.w.myList = List((0, 0, -0, -0),
                     [{"Custom Parameter": "myCP", "content": "CpCode"}],
								{"title": "Custom Parameter", "text": ""},
								{"title": "content", "text": ""},

    def editCallback(self, sender):

Your snippet works just fine on my end.
Tab, Enter and edits all work.
The sender is not an NSTextField though, but a vanilla list object.

Glyphs 3234
Python 3.11.6 (Glyphs)
M1 MacBook Pro, 12.6

1 Like

Thanks, Mark, for testing.
Updating to MacOS 14.4, didn’t solve the problem.

Interestingly, if I use the latest version from the original repository rather than the one downloaded from the plugin manager (GitHub - schriftgestalt/vanilla: A Pythonic wrapper around Cocoa.), it works. @mekkablue

Looking at your error message I also suspect vanilla. But I cannot pin it more down from there. It could be that the vanillaList tries to import another object that fails to import some NS…object (from AppKit) that is not available anymore in your newer Mac OS, and then that vanilla object is not loaded. hence the 'super' object has no attribute ... message. And your version which works might have that fix already implemented.

But it is just a blind guess

1 Like

That problem was fixed in the main vanilla repo. I updated my fork to the latest version. Should work now. But hopefully nothing else broke.