Hi all,
Is it possible to create a "save file dialog box" in the dss javascript in code composer studio v 6.1.0.00104 ? I am trying to create a script that will save a memory location to a binary file when you push a button (which I achieved by placing the script in the hotmenu: Scripts -> myScript). I got that much to work, but it would be nice to prompt the user first for the location of the file to be saved (so it can be run multiple times without always just overwritting the same hardcoded filename). I should mention the motivation for a script as opposed to using the CCS built in "save memory" function is because the number of words for the variable is large and cumbersome to calculate. I tend to forget things and don't want to have to go back and find out this magic number each time I want to save memory. So I'm basically trying to reinvent the "save memory" dialog with the start address and words hard coded.
I have seen references here that "most" java API calls are supported (specifically File I/O), but java implements open file dialog boxes with java.swing.JFileChooser instead of the java.io package. I can't get this swing package to work.
importPackage(Packages.com.ti.debug.engine.scripting); importPackage(Packages.com.ti.ccstudio.scripting.environment); importPackage(java.io); importPackage(java.lang); importPackage(java.swing.JFileChooser); var temp = new JFileChooser(); temp.showOpenDialog();
In the above code snippet I see the program fails on the line
var temp = new JFileChooser();
with the error -- ReferenceError: "JFileChooser" is not defined.
Thanks for any help!