Difference between revisions of "ISDBScriptControl::Reload"

From MediaMonkey Wiki
Jump to: navigation, search
(style)
 
Line 8: Line 8:
 
===Method description===
 
===Method description===
  
This method is for script development only. When called with a full script path, the script will be reloaded from disk before the its next event is called and so updated source from disk is used instead of the already loaded code from memory.
+
Method is for script development only! When called with a full script path, the script will be reloaded from disk before the its next event is called and so updated source from disk is used instead of the already loaded code from memory.
  
In case the ScriptPath parameter is an empty string, all strings in memory will be reloaded.
+
In case the ''ScriptPath'' parameter is an empty string, all scripts in memory will be reloaded.
  
Note that by calling this method you lose all global variables of the reloaded script, their content can't be preserved. On the other hand, all registered events and SDB.Objects are preserved.
+
Note that by calling this method you lose all global variables of the reloaded script, their content can't be preserved. On the other hand, all registered events and old instances in [[ISDBApplication::Objects|SDB.Objects]] are preserved.
  
Introduced in MediaMonkey 3.1.0.1212.  
+
''Introduced in MediaMonkey 3.1.0.1212.''
  
 
[[Category:Scripting|{{PAGENAME}}]]
 
[[Category:Scripting|{{PAGENAME}}]]

Latest revision as of 20:28, 20 April 2013

CoClass SDBScriptControl, Interface ISDBScriptControl

Sub Reload(ScriptPath As String)


Parameters

Name Type Description
ScriptPath String Script file to be reloaded.


Method description

Method is for script development only! When called with a full script path, the script will be reloaded from disk before the its next event is called and so updated source from disk is used instead of the already loaded code from memory.

In case the ScriptPath parameter is an empty string, all scripts in memory will be reloaded.

Note that by calling this method you lose all global variables of the reloaded script, their content can't be preserved. On the other hand, all registered events and old instances in SDB.Objects are preserved.

Introduced in MediaMonkey 3.1.0.1212.