View Full Version : Girder event associated with a NR client connecting?
danjb
March 22nd, 2006, 10:35 PM
Is there an event in Girder 4 I can use to trigger some actions when a NeRemote client first discovers / attaches to a Grder instance? I would like to use this event to trigger some actions that first initialize a new NR client to display the correct information.
I tried using LUA: Girder to Girder -> ClientOnline event, but this does not seem to trigger anything when I start a NR client. Is there something specific to NR, that differentiates it from a Girder connection? Thanks for any help.
Rob H
March 23rd, 2006, 12:04 AM
What I generally do is initiate this from the NetRemote client.
I use the OnGirderReady() function (see the NR Designer manual for this) to trigger an event in the Girder instance using NetRemote.ExecuteAction(-1, 0, 1, 'MyEventName') - the -1 there is the plugin ID of the Girder instance.
This has the advantage that you can then have multiple clients that do different things - some may be on PPCs and some on Win32 with larger displays, so you might need to tell Girder how much information to send.
Ben: Will NetRemote.ExecuteAction() take a real plugin instance as the first parameter or just an ID?
danjb
March 23rd, 2006, 11:47 AM
Thank you, this seems to do the trick !! Is there an easy way in the OnGirderReady callback function to determine the Girder instance /pluginid which triggered its call? For now, I am just using -1, the default Girder instance, which works fine for one Girder. But when I am deploying, I will have multiple Girders in my environment, and would like to be able to do ExecuteAction only on the Girder which triggered the OnGirderReady callback.
Rob H
March 23rd, 2006, 02:04 PM
There is a second parameter to OnGirderReady which is the Girder instance id. If you specify that then your function will only be fired when that Girder instance becomes available.
If that isn't sufficient then let me know.
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.