PDA

View Full Version : changeing pages



mpg732
June 17th, 2010, 02:23 PM
Ok, I have a PC running Netremote and Girder, with a touch screen. I also using a PPC set to interface with the same PC. What Im trying to do is to synce the two up, meaning when I jump to the a page on the PPC, I want the touch screen to change to the same page as well, and vise versa...

How can this be done?

Rob H
June 23rd, 2010, 05:01 AM
That should be fun!

In NetRemote you need to add something like


NetRemote.RegisterEvent(Events.PageLoaded,
function(panel)
local panelName, devName
if panel == nil then
print('Panel is nil in Events.PageLoaded handler')
return
elseif panel:GetPageGroup() == nil then
print('Page group is nil in Events.PageLoaded handler')
return
end
panelName, devName = panel:GetName(), panel:GetPageGroup():GetName()
NetRemote.ExecuteAction(-1, 0, 1, "NRPageChange(" .. devName .. "," panelName.. ")")
end)

In Girder you would then need an action that is triggered by this event that will use the parameters in pld3 and pld4 (I think!) that would call NetRemote.Jump(pld3, pld4).

One thing I'm not sure about is whether this will cause a loop - let me know if it does and I'll see what I can suggest.