TGUI Forum

General Category => Help requests => Topic started by: nicolasd1018 on 31 July 2020, 03:31:07

Title: Connect not available
Post by: nicolasd1018 on 31 July 2020, 03:31:07
For some reason, connect is not available as a method for widgets. It just isn't there. How can I fix this?
Title: Re: Connect not available
Post by: texus on 31 July 2020, 08:24:20
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(...).
Title: Re: Connect not available
Post by: nicolasd1018 on 01 August 2020, 00:16:34
Thanks!