PDA

View Full Version : Girder event when leaving page?



mdekort
May 9th, 2009, 03:02 PM
I have 3 pages:
Page 1
Page 2
Page 3

When I am for example in page 2 and switch to page 1 or 3 I want to send an event to girder to execute several things.

Reason: Page 2 is the Xbox360 control page. When I move away from that page girder needs to execute some stuff like resetting the receiver, switching the channels in the DHMI switcher etc.

How can I achieve this.
Thanks for any help
Michael

VicVonDoom
May 9th, 2009, 04:05 PM
you can use a watcher again to get it into girder...

function OnCCFLoad()
NetRemote.RegisterVariableWatch('NR.PanelName',Net Remote.GetPlugin('Girder'))
end

In NetRemote the variable "NR.PanelName" changes its value (PLD3) to the name of the page you are currently on then the above watcher updates the girder logger only when you change page...

If you already use the code function "OnCCFLoad()" you will only need the second line above. Put on the line above "end".

Rob H
May 10th, 2009, 09:58 AM
Probably better to use RegisterPanelWatch or NetRemote.RegisterEvent really.