I success Klaas to save custom value by using DoSave but when I try to load
it again, it seems that DoLoad event is not called in my class. For checking
if DoLoad is called or not, I change my DoLoad and DoSave method that are
shown below.
void MyImage::DoLoad(wxObject* parent, a2dIOHandlerXmlSerIn& parser,
a2dXmlSer_flag xmlparts )
{
wxLogMessage("load");
// a2dImage::DoLoad( parent, parser, xmlparts );
// if ( xmlparts == a2dXmlSer_attrib )
// {
//
// faceId_ = parser.RequireAttributeValueDouble( wxT("faceId") );
// wxLogMessage("faceId load 2: %i", faceId_);
// }
// else
// {
// }
}
void MyImage::DoSave(wxObject* parent, a2dIOHandlerXmlSerOut &out,
a2dXmlSer_flag xmlparts , a2dObjectList* towrite )
{
wxLogMessage("save");
// a2dImage::DoSave( parent, out, xmlparts, towrite );
// if ( xmlparts == a2dXmlSer_attrib )
// {
// out.WriteAttribute( wxT("faceId"), faceId_ );
// }
// else
// {
// }
}
When I save my file, there is a log message for save and my custom value is
saved in CVG file successfully but when I load this file, there is no log
message for load.
On Sun, Mar 16, 2008 at 9:40 PM, klaas.holwerda <[EMAIL PROTECTED]>
wrote:
> Budi Irawan wrote:
> >
> > For example: I have a a2dImage that have custom identity (int) in my
> > canvas, then I save document and if I open it again, I can retrieve
> > that identity value again.
> I think you want properties on canvas objects. See canobj.h/cpp it is
> used a lot.
> Study a2dPropertyId and a2dNamedProperty. in id.h and gen.h.
>
> I assume you have generated the doxygen documentation.
>
> But you can aslo derive from a2dImage and add your custom id, DoSave and
> DoLoad of that object will do the rest.
> >
> > is it possible?
> >
> Yes.
>
> Regards,
>
> Klaas
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Wxart2d-users_dev mailing list
> Wxart2d-users_dev@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Wxart2d-users_dev mailing list
Wxart2d-users_dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev