retrieving a list of file name in popup button

Yamuna Vallipuram <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Hi...

I am quite new to WebObject so I have a question retrieving file  
names from a path and displaying them in a popup button,

my popup button list binding is getAllfiles
and stringDispaly is getFilename

When I try run the project I get en error message  at  
PersonImport1.getAllefiler(PersonImport1.java:122)-  
NullPointerException. My codes returns the correct directory path,  
but I am unable to retrieve the files. What am I doing wrong here...


public NSMutableArray getAllfiles() {
     	if (downloadDir.exists() == false) {
     		downloadFeilmelding= "directory not found!";
     	} else {
          File files[] = downloadDir.listFiles();
          for (int i = 0; i < files.length; i++) {
         		fileArray =new NSMutableArray(files[i]);
          }
     	}
     return fileArray;
     }

     public String getFilename() {
     	String tmp;
     	tmp = enFil.getName();
     	return tmp;
     }

Any help will be appreciated
regards Yamuna
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.