Connect not available

Started by nicolasd1018, 31 July 2020, 03:31:07

nicolasd1018

For some reason, connect is not available as a method for widgets. It just isn't there. How can I fix this?

texus

The connect function has been removed in TGUI 0.9-dev.
There are no tutorials for this version yet, the only indication that the connection function was removed is in the changelog:
Quote- Rewrote signal system again, b->connect("Pressed",...) is now b->onPress(...)

So you have to use those onXxx members now.

If you are in a situation where you only have the string that you want to connect (e.g. the "pressed" string was read from a text file) and you need to connect dynamically and can't use those onXxx members then you can use widget->getSignal(signalName).connect(...).