Is there a way to save and open up a state of floatcanvas?

I am looking to be able to open up a saved state of floatcanvas. I was wondering if this was possible using floatcanvas for python. What type of file would I save the canvas as? Any thoughts on this would be greatly appreciated.

For my wine rack designer I use FC and save the layout to an XML
stream which I store in a database blob.
I don’t think there is anything out of the box.
Werner

···

Hi,

  On 6/12/2014 15:11, Matthew Jones wrote:
      I am looking to be able to open up a

saved state of floatcanvas. I was wondering if this was
possible using floatcanvas for python. What type of file would
I save the canvas as? Any thoughts on this would be greatly
appreciated.

There is not anything out of the box. I suppose it would be nice to do
that, but it would be a lot of work.

However, you may be able to pickle a FloatCanvas -- worth a try anyway!

I'm guessing that _something_ will not work right, there is a lot there.
But it may not be hard to fix the parts you really need. For instance,
pickling individual DrawObjects would probably work, so you could pickle
the contents of canvas._DrawList and maybe canvas._ForeDrawList = ,
and you'd have the key bits.

The other reason (other than not getting around to writing the code) I
haven't written a persistence system is that I've always thought of
FloatCanvas being used as the View in an MV* -ish system. So the stuff you
really want to persist is your model, not the Canvas itself.

-Chris

···

On Thu, Jun 12, 2014 at 9:41 AM, Werner <wernerfbd@gmx.ch> wrote:

On 6/12/2014 15:11, Matthew Jones wrote:

I am looking to be able to open up a saved state of floatcanvas. I was
wondering if this was possible using floatcanvas for python. What type of
file would I save the canvas as? Any thoughts on this would be greatly
appreciated.

For my wine rack designer I use FC and save the layout to an XML stream
which I store in a database blob.

I don't think there is anything out of the box.

--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov