Plugin example code for displaying nib-based UI


I’ve just started looking into writing my first Glyphs plugin and have been looking at the template code available in the repository along with its documentation. I would like to load a nib-based UI from a class that is similar to the General Plugin example but can’t quite figure out how. I’ve succeeded doing this with a Filter (i.e by following the “Filter with Dialog” example), however, the behaviour of Filters is not quite what I need. I assume I would have to somehow instantiate or get a reference to the view controller and then call showWindow on it(?)

Any help/advice along with some basic example code on how to go about this would be greatly appreciated. Thank you!

What exactly are you trying to do?
How familiar are you with PyObjC? Or Cocoa, for that matter?

Hi Rainer,
I want to collect some basic user input (spacing values) which I then want to apply to either a selected set of Glyphs or all Glyphs. I’m not too familiar with PyObjC, I’m afraid. Cocoa is also fairly new to me, but I know my way around Cocoa Touch/UIKit from iOS development.

Are you writing this in ObjectiveC? I can make a small sample project tomorrow. But you can google ‚NSWindowController example‘ and find plenty of reference.