Current News

Moderator: Mmiscool

User avatar
By russm
#49152 I've been fighting a very weird problem which I now think might be a bug. In my code, whenever I would use print or wprint after setting up a button the serial interface would show vars followed by a count of numbers. Turns out these represent the number of variables defined. I confirmed this by using the GUI Example code you created for version 3 but added a couple extra variables. With the original program only var followed by a 0 would occur (twice) each time a button was pressed. With this slightly modified code, var followed by 0-3 are sent.

In another program I'm working on vars and the numbers printed take so long as to crash the device. To get around this in my current program I don't print anything else to the UI and everything else works, I use returngui to refresh. I just send updates to the serial line (serialprintln) for diagnosing work.

Here is the code:
Code: Select allcls
wprint "hello world <br>"
bla = "Test contents of textbox"
blb = "another variable"
blc = 32
bld = "yet another variable"
textbox bla
button "This is my button 1", [test1]
button "This is my button 2", [test2]
button "Exit", [TestExit]
wait

[test1]
print "You Clicked on 1"
print bla
wait

[test2]
print "You CLiked on 2"
bla = "number 2 was clicked"
wait

[TestExit]
end


Here is the serial output:
Code: Select all0 winsock connected 192.168.10.12
KO
guicmd:13
13
Current line = 12
You Clicked on 1
Test contents of textbox
vars
0
1
2
3
vars
0
1
2
3
User avatar
By Mmiscool
#49197 Sliders need a variable name. Not a string.

Example:
Code: Select allslider sliderone,10,20
slider slidertwo,4,8
wait


Check out the vars page after changing one of the sliders.