[Gambas-user] ncurses, question

Benoît Minisini g4mba5 at gmail.com
Wed Jan 6 22:31:55 CET 2021

Le 06/01/2021 à 22:25, Tobias Boege a écrit :
>> Shouldn't the user be able to close the default static window to terminate
>> the application?
> Closing is currently bound to the window's reference count. You can close it
> by assigning Null to every variable holding the window object. To implement
> a Close method, I would need to know how to mark an object as invalid using
> the interpreter APIs after I destroyed its contents, even if other parts of
> the program still hold a reference to the window. Can you tell me?
> Best,
> Tobias

You have to add "GB_HOOK_CHECK(xxxx)," to the class description, where 
"xxxx" is the name of a function declared that way:

int xxxx(void *object)
   // Return 1 if the Gambas object "object" is invalid,
   // and 0 if it is valid.

You have an example with CWIDGET_check() in the CWidget.cpp files of 
gb.gtk, gb.gtk3, gb.qt4 or gb.qt5.


Benoît Minisini

More information about the User mailing list