PDA

View Full Version : Problem with delay



sonata31
November 8th, 2007, 07:28 AM
I have 2 frames
Frame0 visible when NR.F.wifi0 = 1
Frame1 visible when NR.F.wifi1 = 1

When I start, NR.F.wifi0 = 1 : Frame0 is visible

I have a button with these actions :
NRBasic:Set variable to value(NR.F.wifi0,0)
DELAY:Delay:3000
NRBasic:Set variable to value(NR.F.wifi1,1)

I expect that : Frame0 disappears, wait 3 seconds, Frame1 appears

But I observe : wait 3 seconds, Frame0 disappears, Frame1 appears

Ron
November 8th, 2007, 10:04 AM
The cause of this is the same as your other post. While Lua is executing NetRemote does not draw it's interface. Looks like NetRemote does not have a timer object but it does have a threading support. Try running that code on a thread,.. see the NetRemote designer manual for details.

mhwlng
November 8th, 2007, 11:48 AM
. Looks like NetRemote does not have a timer object .

function show(timer)
timer:KillTimer();
-- do stuff
end

NetRemote.SetTimer(1000,show);


Marcel

sonata31
November 8th, 2007, 01:27 PM
An exemple for my probleme ?

sonata31
November 8th, 2007, 04:02 PM
It's Ok with SetTimer

Thank You

Ron
November 9th, 2007, 11:46 AM
Thanks Marcel, note to self, add to manual :-)