Page 1 of 1

Cant set textfield 'content' to local variable

Posted: 28 Nov 2017 15:02
by Bonobo
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

Re: Cant set textfield 'content' to local variable

Posted: 28 Nov 2017 18:20
by schoko
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

Re: Cant set textfield 'content' to local variable

Posted: 29 Nov 2017 10:06
by Bonobo
Thank you very much !!

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