How do I "activate" functions?

Moderator: Moderator Group

How do I "activate" functions?

Postby claude.rivet » Tue Apr 01, 2014 4:20 pm

Good day,

I built a WDPro project in which I am using functions, very simple ones, for a macro like the following:

Code: Select all
if vtog = me1dev2
{
VValue,vtog,me1dev1
}
else
{
VValue,vtog,me1dev2
}


Which basically toggles the variable vtog between two other variables.
Now let's make a function out of it so it can be re-used with multiple variables

Code: Select all
togglelayer{switch,device1,device2}

if switch = device2
{
VValue,switch,device1
}
else
{
VValue,switch,device2
}


to call back that function and inject values in it I will then write

Code: Select all
togglelayer{vtog,me1dev1,me1dev2}


Sometimes it works, sometimes it doesn't and I have no clue why. Yesterday the very same WDPro project, works. Today, it doesn't. Then again yesterday I was building the project so maybe there is something that needs to be done for functions to work and I did it while programming, maybe my code is badly written, I'm lost :).

Thanks for the help
Last edited by claude.rivet on Wed Apr 02, 2014 3:14 am, edited 1 time in total.
claude.rivet
 
Posts: 67
Joined: Tue Aug 07, 2012 5:40 pm

Re: How do I "activate" functions?

Postby claude.rivet » Tue Apr 01, 2014 4:28 pm

Just found the cause but I still need help on how to work around this.

If I go in the function window select my function and click "apply" the function appears again in my command list and works. So everytime I open my WDPro project I need to open the "function" window select all my function one by one and click apply for each. I guess there is an easier way or a workaround.

Thanks for the help
claude.rivet
 
Posts: 67
Joined: Tue Aug 07, 2012 5:40 pm

Re: How do I "activate" functions?

Postby Dennis Kuypers » Fri Apr 04, 2014 12:36 pm

Hey,

this issue has been addressed in revision 709. You probably have to wait for the next public beta/release candidate.

Best regards
Dennis
Dennis Kuypers
(former Product Developer, Software)
Dennis Kuypers
coolux Germany
 
Posts: 771
Joined: Thu Jul 05, 2012 12:18 pm

Re: How do I "activate" functions?

Postby claude.rivet » Wed Apr 09, 2014 8:48 pm

Awesome, thanks! Looking forward to the next release :)
claude.rivet
 
Posts: 67
Joined: Tue Aug 07, 2012 5:40 pm


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 42 guests

cron