This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCSv4 : Console Scripting -> loadJSFile works but unloadJSFile does not

Hi

CCSv4.1.3

I am able to load my .js, but can't unload it. See below. Any ideas?

The loadMem.js file has a function called load_mem which can be seen when I type "help load"

Cheers

 

js:> loadJSFile c:\Work\CCsv4_ndk\loadMem.js

 

js:> help load

    loadCoff loadData loadJSFile loadKeyword loadProg loadRaw load_mem

js:> unloadJSFile c:\Work\CCsv4_ndk\loadMem.js

    c:\Work\CCsv4_ndk\loadMem.js (The system cannot find the file specified)

js:> unloadJSFile "c:\Work\CCsv4_ndk\loadMem.js"

    c:\Work\CCsv4_ndk\loadMem.js (The system cannot find the file specified

 

)

  • Hi Eddie,

    unloadJSFile will unload a .js file that was previously loaded by loadJSFIle (with the store parameter beening "true"). If you didn't specified the store parameter, it is not possible to unload. Also, please see the unloadJSFile documentation for it's limitation (enter unloadJSFile /? in the console).

    Regards,
    Patrick

  • Hi Patrick

    Patrick Chuong said:
    please see the unloadJSFile documentation for it's limitation

    The help below doesn't say anything about the "store parameter", but I found it in the loadJSFile help. Thanks.

    (I wish it mentioned this requirement in the unloadJSFile help)

    js:> help unloadJSFile

    Description: Unload a JavaScript file or all JavaScript files belong to the directory, the file(s) will be unloaded after the console view restart.
    Syntax: unloadJSFile file
    Arguments:
      path - the JavaScript file or a directory.

    js:>

    Patrick Chuong said:
    If you didn't specified the store parameter, it is not possible to unload.

    OK, lets try it.

    js:> loadJSFile c:\Work\CCSv4_pwcw\eLoadMem.js true

    js:> e
    eload_mem      enableLog      eval           execCmdFile    exit           expAdd         expRemove      expRemoveAll   expViewId      exportAll

    js:> unloadJSFile c:\Work\CCSv4_pwcw\eLoadMem.js

    Success!