#N canvas 192 103 1042 471 12;
#X obj 82 73 savestate-example;
#A saved 110 660;
#X text 223 71 open the abstraction at left (right- or CTRL- click
and select "open" in popup menu) to see how the savestate object is
used from within., f 46;
#X obj 82 158 savestate-example;
#A saved 221 440;
#X text 223 162 parameters for different copies of the abstraction
are saved and restored independently., f 32;
#X text 828 430 updated for Pd version 0.49.;
#X text 84 281 The abstraction may itself be modified at will without
disturbing the saved states of its copies in any calling patches \,
as long as the usage of the saved and restored lists is kept compatible.
;
#X text 610 272 Multiple savestate objects are not differentiated -
they all receive all lists sent to any one of them.;
#X text 610 322 Hint: 'text' objects can be saved/restored using 'text
tolist' and 'text fromlist'.;
#X text 86 250 Abstractions within 'clone' objects are not handled.
;
#X obj 75 27 savestate;
#X text 148 26 - save and restore run-time state from within an abstraction
;
#X text 608 66 The savestate object is used inside abstractions to
save their state as they are used in a calling (parent) patch. When
the parent patch (such as this one \, which calls the "savestate-example"
abstraction) is saved \, the included savestate object sends a 'bang'
message out its right outlet \, with which the abstraction may respond
by presenting one or more 'list' messages back to the 'savestate' object.
These lists are saved as part of the calling patch. If the calling
patch is reopened later \, the lists are sent out the left outlet of
the savestate object. The abstraction can then use them to restore
its state.;
#X text 83 355 The saved messages are output when the object is recreated
\, before any outside connections are made and possibly before other
parts of a saved patch have been restored. You can use a "loadbang"
object to send messages to objects elsewhere in the owning patch at
load time once the entire patch is loaded.;
