[gtkmm] More info: saving from main window? strange hanging @ ofstream::write()



I have created a very short and simple demonstration of the problem.  I
have attached it to this e-mail.

To see this work after reviwing it, compiling it and starting it:

1st

view->preferences
save
note output in console window where you started the program from
in another window, view contents of "test" which is the file it creates
AND DEFINITELY RUN THIS IN ITS OWN DIRECTORY SO YOU DON'T CLOBBER A FILE
NAMED TEST IN YOUR DIRECTORY  :)

2nd
file->save
note hang, note output in console window (compare to myFileWriter.cc to
see where it hangs)
in another window, view contents of "test" which is the file it creates

3rd
restart it
file->save
note hang
in another window, view contents of "test" which is the file it creates

Note the text area is just there in both the main window and dialog, it
doesn't actually do anything with it, even during the save.

Can anyone see what is wrong?

Mark

On Mon, 2002-12-16 at 01:55, Mark Jones wrote:
> I have run into something very strange.  I have a file writer, and I can
> use that file writer to write to a file when I call it from the signal
> handler for a button that is on my own dialog (and the dialog is brought
> up by a signal handler for a menu item in my application).  However, if
> I try to do the same thing from the signal handler from my File->Save
> menu item, it hangs the application (it is freezing on the first
> ofstream::write() call).  Is there something special I need to do to
> write to files from different places in a gtkmm program?
> 
> The file writer is fine I think because it works when called from the
> dialog and in a command line driver program I wrote to test it.
> 
> Any ideas of what is going on?
> 
> Thanks!
> 
> Mark

Attachment: savehang.tar.gz
Description: GNU Zip compressed data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]