[AG-DEV] node service api, saving/restoring configs ....

Rhys Hawkins Rhys.Hawkins at anu.edu.au
Mon Aug 22 22:28:32 CDT 2005


Hi Darran,

In the __init__ function do (for each setting):
        self.debug = OptionSetParameter( "debug", "disable", [ "enable",
"disable" ] )
	self.configuration.append( self.debug )

Then in your Start method, you can get the setting using:
	if self.debug.value == "enable":
		#do stuff

The toolkit takes care of saving settings. The best documentation is the
code so unzip the VideoProducerService.zip and have a look at the other 
ways to display settings to the user (eg TextParameter).

Cheers,
    Rhys

On Tue, 2005-08-23 at 13:11 +1000, Darran Edmundson wrote:
> Reading through the node services programming manual:
>      http://agcentral.org/help/link/helpcenterlink.2005-08-05.1173198752
> I don't see anything on saving and restoring a node services'  
> configuration.
> How do you make the changes persistent across sessions?
> 
> Cheers,
> Darran.
> 
> Darran Edmundson (darran.edmundson at anu.edu.au)
> ANU Supercomputer Facility Vizlab
> Australian National University, Canberra, ACT 2600
> tel: +61 2 6125-0517  fax: +61 2 6125-5088
> 




More information about the ag-dev mailing list