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