Doc/view: how to notify open/save failure?
Biozic
bioziccc.minus2c at free.fr
Fri Nov 16 11:33:28 PST 2007
Hi,
I am trying to use the document/view framework. I have overridden
wxDocument::LoadObject to parse my data files. I am now told (by the
documentation) that wxDocument::OnOpenDocument calls
wxDocument::LoadObject and that if LoadObject does not return true, an
error message box is displayed.
wxDocument::LoadObject does not return a boolean!...
I have managed to get the desired effect by inserting
stream.setstate(std::ios_base::failbit);
in LoadObject (since I am using the standard stream version), but this
looks weird to me, and I wonder if this is relevant or if there is a
more simple solution?
Thanks
Nicolas
More information about the wx-users
mailing list