On Fri, 15 Dec 2006, Frank Barknecht wrote:
A further step would be some easy way to read and write the state of objects without having to watch their communication through senders and receivers, but that's the hard part, because it touches philosophical questions like: What actually is a state? ;)
There's nothing funny or joke-like in that. I ask you: what is a state?
I'd say, a state is whatever you may want to save. Is that a good definition?
However, for a general state-saving mechanism, you need more than just a concept of state, you need specifically take care of the part of the state that doesn't get saved already as part of the constructor. The constructor may be defined as the contents of the objectbox, regardless of whether it's visible or not; the concept can be extended to mean the whole line as it appears in a .pd file, and furthermore to include any #A lines and other possible extras.
If you save a IEMGUI object, such as an [hsl], you are saving a lot of things that may be considered as state already. All those things get saved as if they were part of an objectbox. In the case of floatboxes (Ctrl+3) and symbolboxes (Ctrl+4) it's similar except that it's not technically an objectbox (pd has strange exceptions like this; you can see that by reading .pd files).
What do you think?
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada