A Few Widget Tips

Moderator: Moderator Group

A Few Widget Tips

Postby nypb » Sun Feb 01, 2015 7:54 pm

I figured I would start this thread as a repository for stuff that I find useful. Hopefully, you may too.

First, and basic yet important.

Null Values:
Sometimes it is useful to evaluate against a null or empty value, like if checking an array member is empty or if a textbox is empty (so that maybe it can be filled with a default value).

Simply declare a Variable such as nullString in Variable List and do not assign it a value.
Evaluate against it such as;

Code: Select all
if Textbox1.text = nullString
{
Textboxt.text = Default Value
}
else
{
...
}

To declare in script without value, of course:
VString,nullString,


So that's it. And if anyone knows of another way to reference a null value without explicitly declaring it, let me know!
Please feel welcome to add your own tips 8) .
Last edited by nypb on Fri Feb 06, 2015 8:32 pm, edited 2 times in total.
nypb
 
Posts: 3
Joined: Thu Dec 04, 2014 6:12 pm
Location: New York City, NY, USA

Function Blocking and TCP

Postby nypb » Fri Feb 06, 2015 8:26 pm

Ever send a bunch of TCP commands and have them step all over each other?

Seems like WD will send commands as fast as it can but TCP protocol / buffer cannot keep up!

Well Synchronize those babies. Assign a variable to that function call and that's a great start.
The function you are calling still needs to be written efficiently to keep the TCP commands arriving in a timely manner.

Code: Select all
For 1 to 15
i = for.index
variable = someFunctionThatSendsTCPCommandsToADeviceNumbered{i}
Next
nypb
 
Posts: 3
Joined: Thu Dec 04, 2014 6:12 pm
Location: New York City, NY, USA


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 20 guests

cron