specifying file name at command prompt

Hi,

I'm trying to specify the name of the .csv file I want in the SS cells by 
typing it in at the command line. When I click on my "READ" button which reads 
in the filename, the correct file is loaded in but for some reason, the file is 
als loaded into the top left cell with the default mappings displayed. So when 
the SS first opens up, I have a mapping at cell 0,0 before I have even clicked 
on READ which calls addDataSource() and works fine from that point forward. 
I made the variable dfile in main() into a static class variable and 
initialized it to null and then made this change in main():

    //String dfile = null;
    dfile = null;

I got a null pointer exception:

        at visad.DisplayImpl.doAction(DisplayImpl.java:1602)
        at visad.java2d.DisplayImplJ2D.doAction(DisplayImplJ2D.java:306)
        at visad.ActionImpl.run(ActionImpl.java:303)
        at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)

and it's complaining about the same line as before that I sent in a previous 
email. Without initializing dfile to null in the declaration, there is no null 
pointer excpetion but cell 0,0 still has the mapping loaded in initially before 
I ever press READ. Does anyone know where in main() I should comment out the 
code to load in a data file? I can't see where this might be since there is ... 
"if (dfile != null) {" which checks if dfile is null (which it is not 
apparently) before ever reading anything in.

Thanks,
Michelle

Michelle Kam           (408) 742-2881
Lockheed Martin Space Systems Co. SSM/ATC/MSIS
B/153 O/L922 
1111 Lockheed Martin Way, Sunnyvale, CA 94089




  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: