Connect not available

  • 2 Replies
  • 125 Views
Connect not available
« 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?
« Last Edit: 31 July 2020, 05:44:33 by nicolasd1018 »

*

texus

  • *****
  • 1584
    • View Profile
    • Texus's Blog
Re: Connect not available
« Reply #1 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(...).

Re: Connect not available
« Reply #2 on: 01 August 2020, 00:16:34 »
Thanks!