Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development > Front Ends > Road Runner


Reply
 
Share Thread Tools Display Modes
Old 04-29-2009, 01:21 AM   #1
Constant Bitrate
 
Join Date: Dec 2008
Posts: 162
efun is an unknown quantity at this point
How to get/set VAR in plugin?

My plugin has some vars which need to be kept when RR exit and restore when RR start. Here is my code, but it does not work. Any suggestions?

Get the var value in New() of RRExtension
Dim station As String = SDK.getInfo("STATION")

Save the var to skin.ini in Finalize() of RRExtension
SDK.execute("SAVETOSKIN;STATION;" + station)
efun is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 04-29-2009, 08:51 AM   #2
RoadRunner Mastermind
 
guino's Avatar
 
Join Date: Nov 2004
Location: Vitória, ES - Brazil
Posts: 9,060
guino will become famous soon enoughguino will become famous soon enough
Well, if you're defining station within the scope of New() or Initialize() it will not be available in Finalize(), you need to declare station in a global scope (i.e. first line of the class module) then grab/set the value of it with getinfo at any given time during the execution of the plugin (i.e. startup, initialize, etc). Just be sure to call execute with savetoskin BEFORE your plugin destroys the SDK object.
__________________
Ride Runner RR's Myspace

"Being happy is not about having what you want, it's about wanting what you have."
"The best things in life are always free - but that doesn't mean money can't buy you good things."
guino is offline   Reply With Quote
Old 04-29-2009, 09:36 AM   #3
Constant Bitrate
 
Join Date: Dec 2008
Posts: 162
efun is an unknown quantity at this point
To debug, I pre-defined the STATION in skin.ini : STATION=10

1) set a label code with "=$station$", the label display 10 which is correct
2) call SDK.getInfo("STATION") in plugin, but it returns ""

any wrong in my code?

Last edited by efun; 04-29-2009 at 09:39 AM.
efun is offline   Reply With Quote
Old 04-29-2009, 09:49 AM   #4
FLAC
 
Sal R.'s Avatar
 
Join Date: Aug 2006
Location: Sun Diego
Posts: 1,405
Sal R. is an unknown quantity at this point
Quote: Originally Posted by efun View Post
To debug, I pre-defined the STATION in skin.ini : STATION=10

1) set a label code with "=$station$", the label display 10 which is correct
2) call SDK.getInfo("STATION") in plugin, but it returns ""

any wrong in my code?

SDK.getinfo("=$station$")
__________________
Pico-ITX / nLite'd XP Pro with EWF-HORM / RR v9/22/2009 / Winamp v5.13 / RRMedia v1.2.2
Sal R. is offline   Reply With Quote
Old 04-29-2009, 11:13 AM   #5
Constant Bitrate
 
Join Date: Dec 2008
Posts: 162
efun is an unknown quantity at this point
Quote: Originally Posted by Sal R. View Post
SDK.getinfo("=$station$")


yeah, it works now. Thanks a lot!
efun is offline   Reply With Quote
Old 04-29-2009, 11:15 AM   #6
Constant Bitrate
 
Join Date: Dec 2008
Posts: 162
efun is an unknown quantity at this point
Where to find the document about the SDK? for example, it's methods and parameters.
efun is offline   Reply With Quote
Old 04-29-2009, 11:23 AM   #7
Constant Bitrate
 
Join Date: Dec 2008
Posts: 162
efun is an unknown quantity at this point
Quote: Originally Posted by guino View Post
Well, if you're defining station within the scope of New() or Initialize() it will not be available in Finalize(), you need to declare station in a global scope (i.e. first line of the class module) then grab/set the value of it with getinfo at any given time during the execution of the plugin (i.e. startup, initialize, etc). Just be sure to call execute with savetoskin BEFORE your plugin destroys the SDK object.

Hi guino, is there a good place to save the var just before RR shutdown? I don't want to savetoskin on every command. Puting code in Finalize() does not work. Seems that the SDK has been destroyed when calling Finalize().
efun is offline   Reply With Quote
Old 04-29-2009, 04:55 PM   #8
RoadRunner Mastermind
 
guino's Avatar
 
Join Date: Nov 2004
Location: Vitória, ES - Brazil
Posts: 9,060
guino will become famous soon enoughguino will become famous soon enough
All you have to is monitor the value, then WHEN IT CHANGES, issue a SAVETOSKIN command, that way whenever you exit, it's already saved.
__________________
Ride Runner RR's Myspace

"Being happy is not about having what you want, it's about wanting what you have."
"The best things in life are always free - but that doesn't mean money can't buy you good things."
guino is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 04-30-2009, 06:27 AM   #9
Constant Bitrate
 
Join Date: Dec 2008
Posts: 162
efun is an unknown quantity at this point
Quote: Originally Posted by guino View Post
All you have to is monitor the value, then WHEN IT CHANGES, issue a SAVETOSKIN command, that way whenever you exit, it's already saved.

it is a good way to save the value. thanks!
efun is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RR 04-01-09 ... Never to late.. (GET HOT FIX) Blue ZX3 Road Runner 69 05-08-2009 09:39 AM
Jan 2009 *NEW RoadRunner updates* (coming soon to a pc near you) mitchjs Road Runner 63 03-10-2009 08:49 PM
pc reboot on sd startup duanes7 StreetDeck 3 12-14-2007 09:55 AM
IRMAN plugin knyarko StreetDeck 3 01-05-2007 09:26 PM
How do I use the Extension Plugin Interface ? guino RR FAQ 0 06-11-2006 06:49 PM



All times are GMT -5. The time now is 07:39 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics