Cant set textfield 'content' to local variable

Discuss problems and solutions.
Post Reply
Bonobo
Newbie
Posts:8
Joined:18 Sep 2017 16:15
Cant set textfield 'content' to local variable

Post by Bonobo » 28 Nov 2017 15:02

Hello swarm intelligence !

Bit of a small problem with a local variable in a multislider (just 1 slider) object.

When I set a local variable for the slider's x value I can monitor this variable just fine from the outside.
If I want to set a text field´s "content" attribute to the value of this variable though, nothing happens.
I can successfully set the "content" attribute to a string but not the value of variable "slider_value".

This is the exact same thing as in the documentation with the example for a fader, but no luck.
What am I missing ?

Your help is highly appreciated.
Thank you !

Image
Image

schoko
Newbie
Posts:38
Joined:07 Feb 2015 17:54

Re: Cant set textfield 'content' to local variable

Post by schoko » 28 Nov 2017 18:20

hi there,

attribute 'content' is a text field not a digit field ...
-> ...'content','' + slider_value);

this makes it to a text field and in the Text object you have to leave out "slider_value" this is a static text field...

cheers
schoko

Bonobo
Newbie
Posts:8
Joined:18 Sep 2017 16:15

Re: Cant set textfield 'content' to local variable

Post by Bonobo » 29 Nov 2017 10:06

Thank you very much !!

You would expect that a modern app automatically converts integers to strings
in that case but oh well ;)

Post Reply