You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Event Handling > getSymbolList

8.23 getSymbolList

on.getSymbolList()

This routine is called when the script app symbol list is being serialized to the Clipboard. The script app returns a list of names of variables in the symbol table that it needs to copy with it to the Clipboard. The TI-Nspire™ software copies the names and values of the variables along with the script app. Then when the user pastes the script app in another problem, the system adds the companion variables to the problem symbol table.

As a remark, on.getSymbolList() is called when a page containing a script app is copied, but not when a problem containing a script app is copied. This is because the entire symbol table is copied when the problem is copied.

For example, the following function indicates that it needs variable f1 to be copied with the app to the Clipboard. The value of f1 will be added to the symbol table when it is pasted into another problem even in another TNS document.

Listing 8.2: Example for getSymbolList

function on.getSymbolList() 
     return {"f1"}
end

Introduced in platform.apiLevel = '2.0'