refreshing plugin variable on screen

related to programming for xlobby, code samples, examples etc.

refreshing plugin variable on screen

Postby damage on Thu Dec 04, 2008 5:53 pm

hi, another question. my plugin pulls data from an external db and i am able to display the data by putting this in a text box plugin>mydb>blah - however when my db updates, i want the xl screen to show the newest data. does this mean my plugin has to force a screen refresh every second or is there a better way to do this? thanks
damage
 
Posts: 35
Joined: Fri Aug 18, 2006 7:07 pm

Re: refreshing plugin variable on screen

Postby lar282 on Thu Dec 04, 2008 8:39 pm

When your data changes u issue the command
SendCommand("invalidate");

that refreshes the XL screen

//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Re: refreshing plugin variable on screen

Postby damage on Thu Dec 04, 2008 10:14 pm

thank you that's what i needed
damage
 
Posts: 35
Joined: Fri Aug 18, 2006 7:07 pm

Re: refreshing plugin variable on screen

Postby P3rv3rt B3ar on Tue Mar 17, 2009 11:37 pm

Even better, if only possible get the buttons of your plugin and invalidate only areas they occupie, cause otherwise u might cause some unnessary overhead even if other plugin writers have cached their results incase theres lot of plugin calls within buttons of screen. This strategy requires that skinners give buttons agreed upon ID though.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland