Problem with IEnumGxObject  in java

714
1
01-08-2013 09:10 PM
New Contributor
Hi All,

I am trying to to use IGxDialog interface for browsing option. But DoModalOpen function on that does not populate selected files to EnumGxObject array. It gets null populated into it. Following is the code used:

                IGxDialog gxDialog=new GxDialog();
  
   IEnumGxObject[] gxObjectEnum=new EnumGxObject[1];
  
   gxDialog.setAllowMultiSelect(false);
   String startingLocation="D:\\Demo";
   gxDialog.setStartingLocation(startingLocation);
  
  
   try {
    System.out.println(gxDialog.doModalOpen(0, gxObjectEnum));
   
    IGxObject gxObj;
   
//Here it just does not enter the loop as gxObjectEnum[0] contains null
    if (gxObjectEnum[0] != null) {
     gxObjectEnum[0].reset();
     gxObj=gxObjectEnum[0].next();
    
     while (gxObj != null) {
     
      System.out.println(gxObj.getName());
      gxObj=gxObjectEnum[0].next();
     
     }
    }

Please help me.

Regards,
Viji
Reply
0 Kudos
1 Reply
New Contributor

Hey Viji,

did you ever find a solution for this, I seem to have the same issue. 

DL

Reply
0 Kudos