SetVariation()

Hello,

If I make changes to variation (1) and then use the SetVariation(1) command GP erases the changes and reverts back to the old variation 1. But if I do SetVariation(2) then SetVariation(1) it saves the widget values correctly.

The reason I set variation to the current variation is so I can send multiple instances of GP widget data to one instance on the iPad TouchOSC app.

Doing a SetVariation() call twice is the only hack that works. But cause the iPad screen to flicker every time I switch instances.

Any option to fix this? Is there another command that refreshes all the widget data without doing a SetVariation?

Hi @Rd800, welcome to the family :wink:

Can you upload your gig file showing the issue?

In the meantime a built a test case and I can reproduce

Is there another command that refreshes all the widget data without doing a SetVariation?

Try this in scripting

ResyncWidget(<p : Widget>)

I made a test file but I can’t upload because I’m a new user. But here is some test code.

if I’m on variation 0 and press the swReset widget any other widgets will not save. Instead they revert back.

//$
// DO NOT EDIT THIS SECTION MANUALLY
Var
swReset : Widget
//$

// Called when a widget value has changed
On WidgetValueChanged(newValue : double) from swReset

if newValue==1 then
    SetVariation(0)
end

End

I don’t think ResyncWidget() is available in GP 3.0. I don’t have 4.0 yet :). Plus I have a lot of widgets to resync. I wish i could pass p: Widget as a widget array!

You are one of us now, I just modified your new user status😉

1.0 SetVariation.gig (6.0 KB)

here is the test file.

The fader is set to max in v1 and set to min in v2.

Go to v1 and set the fader to half way. Then click the button widget twice. The v1 reverts back without saving.

Go to v2 and set the fader to half way. Then click the button widget twice. v2 saves correctly.