Plugin + Variables

Xlobby plugin development

Plugin + Variables

Postby vicom on Wed Jan 25, 2006 6:48 am

In the event manager, we can execute plugin commands that are listed by the plugin. But how is the "variables" field working. How do I extract/receive the content of this field within the plugin...

eg: Plugin = XTest
Command = Print
Variable = "Hello World"

How do i get the "Hello World" part in the plugin, which Method/Function do I use, the GetVariable() command is not working for me..returns nothing

plz help I've been battling for days now
Silverstone LC14M, Axim X30, Touchscreen, Hauppage WinTV PVR II 500MCE Dual Tuner, 2TB RAID 6 NAS
Image
vicom
 
Posts: 206
Joined: Tue Apr 20, 2004 6:16 am
Location: South Africa

Postby badubo on Wed Jan 25, 2006 8:46 am

If you see :

Code: Select all
Plugin = XTest
Command = Print
Variable = "Hello World"

it is because you exported the command Print from your plugin.
I guess also that you are able to handle this command (Print) in the execute method of your plugin (otherwise you have a bigger problem than not seeing the arguments:wink: )
So it is strange that you didn't see that the string passed to the execute method contains "Print Hello World" and not only "Print"
Badubo
Member of XLobby FR Team
~~~~~~~~~~~~~~~~~
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Postby vicom on Wed Jan 25, 2006 8:53 am

badubo wrote:If you see :

I guess also that you are able to handle this command (Print) in the execute method of your plugin (otherwise you have a bigger problem than not seeing the arguments:wink: )


Yes I will handle the command (Print) in the Execute method

So it is strange that you didn't see that the string passed to the execute method contains "Print Hello World" and not only "Print"


Where can the problem be?? I'm running out of hope now :-(
Silverstone LC14M, Axim X30, Touchscreen, Hauppage WinTV PVR II 500MCE Dual Tuner, 2TB RAID 6 NAS
Image
vicom
 
Posts: 206
Joined: Tue Apr 20, 2004 6:16 am
Location: South Africa

Postby badubo on Wed Jan 25, 2006 9:03 am

you confirm that the string in argument of execute contains only the name of the method ?

Did you test from a button, or from the Event dialog (test button) ?
with the test button, you haven't the same behaviour (because it test the command, not the event) and you don't receive the arguments
Badubo
Member of XLobby FR Team
~~~~~~~~~~~~~~~~~
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Postby vicom on Wed Jan 25, 2006 9:17 am

badubo wrote:you confirm that the string in argument of execute contains only the name of the method ?

Yes, it contains only the name of the method

Did you test from a button, or from the Event dialog (test button) ?
with the test button, you haven't the same behaviour (because it test the command, not the event) and you don't receive the arguments


I test on Event dialog (Test) button under the Variables textbox next to the (Add) button...
Silverstone LC14M, Axim X30, Touchscreen, Hauppage WinTV PVR II 500MCE Dual Tuner, 2TB RAID 6 NAS
Image
vicom
 
Posts: 206
Joined: Tue Apr 20, 2004 6:16 am
Location: South Africa

Postby badubo on Wed Jan 25, 2006 9:30 am

I test on Event dialog (Test) button under the Variables textbox next to the (Add) button...

so, test it in the real life (assign an event to a button/category in a screen) and you will see the arguments
Never use the "test" button of the event manager for debugging a plugin...
Badubo
Member of XLobby FR Team
~~~~~~~~~~~~~~~~~
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Postby vicom on Thu Jan 26, 2006 12:38 pm

hey, it works lke a charm .. thank so much .. u made my day... now i can write some handy plugins :-)
Silverstone LC14M, Axim X30, Touchscreen, Hauppage WinTV PVR II 500MCE Dual Tuner, 2TB RAID 6 NAS
Image
vicom
 
Posts: 206
Joined: Tue Apr 20, 2004 6:16 am
Location: South Africa


Return to Plugins

Who is online

Users browsing this forum: No registered users and 2 guests

cron