[EMAIL PROTECTED] escribió:
> This should work, and looking the backtrace i don't understand why not.
> The a2dCommand_FileSave should i think ask for a filename/path.
>
> A simpler way is via a2dCanvasDocument::
>
> bool a2dCanvasDocument::Save(const wxString& filename,
> a2dIOHandlerStrOut* handler ) const
>
> bool a2dCanvasDocument::Load(const wxString& filename,
> a2dIOHandlerStrIn* handler )
>
>
Well, I agree with you, that should be working, but it doesn't. I tried
in the single sample under the editor samples, and didn't. Just the same
but sometimes I get a "Segmentation fault" but some other there is no
error but the code doesn't do what it's expected to... I tried with the
a2command_FileSave and a2dCommand_FileSaveAs with the same results as above.
I was trying to get it working with the other way as you suggest, but
there I got another problem, my code is the following:
a2dIOHandlerStrOut *hdl = new a2dIOHandlerStrOut();
m_canvas->GetCanvasDocument()->Save(wxT("test"),hdl);
I got a compiler error because the a2dIOHandlerStrOut has some pure
virtual method, this are:
virtual bool a2dIOHandlerStrOut::CanSave(const wxObject*)
virtual bool a2dIOHandlerStrOut::Save(a2dDocumentOutputStream&,
const wxObject*)
So, in order to get this class working I suppose I have to create a
derived class and put this method to do something, but i cannot figure
out what?.
I appreciate all your help. Or another alternative to get this working.
> What i tried sofar works on MSW. I think you should load the right
> files. Like for docview they are stored with the
> docview/samples/drawings.
> For the a2dCanvasDocument they are in
>
> samples\editor\samples\common\drawings
>
> Confirm if they work from the samples.
>
> Klaas
>
>
For this, when I load the saved examples in to the canvas it works just
good.
My problem is when I do some modification in a drawing and the save it,
until here the program works fine, I can see the xml output, bu then
when I try to load my saved draw the program freeze and doesn't respond
anymore.
Hope this help, so we can improve the great wxArt2d library and help
you debugging.
Ibraim
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Wxart2d-users_dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev