TFileDialog problem under Windows

Hi,
I had some code that worked fine under Linux. I had to recompile it under Windows. It compiles fine, and when I “Open File” using TFileDialog, it pops up the usual dialog, only nothing shows up in it, i.e. no directories, no files or anything. Again, this used to work fine under Linux. Also, if you just write a script that calls a TFileDialog - that works fine as well.
I’m using gcc 3.4.4 that came with Cygwin. And I tried several versions of ROOT (compiling it from source or installing the binary.)
Any help is appreciated.
Thanks in advance.
Mike D.

Hi Mike,

Do you pass to your dialog some settings by a TGFileInfo object (a list of file types for the filter combo box and the initial directory)?

Cheers, Ilka

Hi Ilka,
Yup, the usual.

static TString dir(".");
TGFileInfo fi;

fi.fFileTypes = (const char **)filetypes;
fi.fIniDir = StrDup(dir);
new TGFileDialog(fClient->GetRoot(), this, kFDOpen, &fi);
dir = fi.fIniDir;

Hi Mike,

The same kind of code is used in the $ROOTSYS/tutorials/guitest.C and $ROOTSYS/test/guitest.cxx. I see no problem to open the file dialog on Windows in both examples via File menu / Open. I have MS Visual Studio .NET installed on Windows and I am not using gcc 3.4.4. My colleagues with deep knowledge on Windows/Cygwin stuff will investigate and advise you further.

Cheers, Ilka

Hi,

test/guitest.exe works fine for me, with cygwin 1.5.19(0.150/4/2), current root cvs, same GCC as yours. Can you try that? Just cd $ROOTSYS/test; make guitest.exe; ./guitest.exe and File->Open.

Cheers, Axel.

Hi,
I tried making and running guitest. exe and guitest.C from the tutorials. The exe file has the same problem - no files or directories, guitest.C is fine. Weird.

Hi,
hmm. As I said, my guitest.exe ist working just fine. Can you send me your exe? Here’s mine - does that work for you?
Axel.
guitest.zip (79.2 KB)

Thanks. Here’s mine.
guitest.tar.gz (77.3 KB)

Hi,
it seems that our x11 versions are not compatible… Can you send me the output of “cygcheck.exe -c -d” and what root version you used when building guitest.exe? What directory are you trying to display? Does my .exe work for you?
Axel.

Hi Axel,
I tried running your guitest.exe and I see the same empty window. The directory is the home directory in which there’s definitely a lot of files and directories. Running guitest.C from the ROOT command line shows them all fine.
I’m attaching the output of cygcheck.exe.

My Cygwin version is : CYGWIN_NT-5.1 1.5.19(0.150/4/2) 2006-01-20 13:28
My ROOT version is : 5.08/00 13 December 2005, CINT 5.16.5 .

Thanks.
Mike.
cygcheck.dat.gz (5.2 KB)

Hi,

I was finally able to reproduce it with the binary 5.08.00 distribution. It works for me if I build the current CVS head. So the problem is caused by an incompatibility of your cygwin version and the one used to build the root distribution, or because of a bug that was fixed after 5.08.00. Just build root yourself, taking the current cvs version (see root.cern.ch/root/CVS.html), and your problems should be gone.

Cheers, Axel.

Thanks. I’m trying to install root from source. It doesn’t want to compile, but I’m sure it’s something simple.