Closing a window


I am building a GUI where I want the user to select a file (perhaps after navigating through some directory structure).

I’ve been using the TestDirList class in guitest.C as a template - and am able to use it to navigate directories and be able to identify if I’ve double clicked on a file. However - I now want to be able to close the window automatically.

In TestDirList, the CloseWindow function just deletes the instance - but if I try to allow the code to call that function itself I get a segfault - probably because the code tries to return to a non-existant instance of TestDirList.

Can someone suggest a good way of doing this?


nevermind - I think I should be using the TGFileDialog class to do what I need