0.9 Errors

Started by RamblingBaba, 01 May 2020, 06:57:02

RamblingBaba

Hello,

I've just switched to 0.9 since I saw it had some features I really wanted. I'm getting these errors though,

Code (cpp) Select

Severity Code Description Project File Line Suppression State
Error C2672 'tgui::SignalTyped<const tgui::String &>::connect': no matching overloaded function found TGUI E:\Libaries\TGUI-0.9-dev\include\TGUI\Signal.hpp 468


Code (cpp) Select

Severity Code Description Project File Line Suppression State
Error C2783 'unsigned int tgui::SignalTyped<const tgui::String &>::connect(const Func &,const BoundArgs &...)': could not deduce template argument for '__formal'
TGUI E:\Libaries\TGUI-0.9-dev\include\TGUI\Signal.hpp 467


I know connect was replaced with a more direct version (like onPress()). But I'm not sure how to repair this.

Thanks

texus

#1
What line in your code is causing this error? I would have to see how you are calling the connect function (or the operator() function) on the signal to see what is wrong.

Maybe your function using std::string or sf::String as unbound parameter? That would have to be changed to tgui::String.

Edit: out of interest, which features were it that you wanted?

RamblingBaba

Hey Texus,

I want to say thanks for the information in my original question about making the color sliders (answered yesterday). I actually got that to all work as intended. When I was trying to find a way to place the starting slider position I came across 0.9 and realized I had 0.8. So I tried to run the same program that worked in 0.8 and changed the connect to the type needed and got this. It does work when I start over, so it does compile, just not the same program.

As I was pasting my code, I was conveniently spotted with the problem. I had button->onPress("pressed",[]...). It works!