Which brings up a question: is it possible to add a method to a class that has already started and ended (using start_new_program() and end_program()). And how could I write the frontend pike code to intercept GTK3.Window and have it call GTK3.method_missing. I was looking at the GTK2 module's module.pmod as a base, but not sure if that is the right way to do it... Thanks...
Adding symbols to a program after end_program() is not supported. If you know symbols att compile-time (but not their values), you can use getters that evaluate the the symbol at first access (and eg store the resulting value in a mapping).
program.c:f_dispatch_variant() may give some clues about how to implement such a function (ie how to look up the name of the current function).
If you don't know the symbols at compile-time, you'll have to resort to using the lfuns `[]() and `->().