Hallo, florian grassl hat gesagt: // florian grassl wrote:
try the method that frank barknecht uses in his angriff/seq stuff. it writes the values of guis to a textfile and can therefore be reloaded dead quick. ( http://footils.org/cgi-bin/cms/ ;thank you frank!)
Actually I'm converting all my patches to use Thomas Grill's "pool" currently, which has several advantages above all other methods of persistence I tried so far and is now my "Memento" of choice. A new release of angriff & co using that approach may be ready next week.
Memento here refers to a software design pattern. Using pool it is possible to abstract the persistance from the algorithm, that's needs to persist a state somehow. The way I (intend to) use pool here is to have a pool object somewhere in an abstraction that is used in e.g. angriff and that gets a user defined name, so it can share it's settings with all other pool objects. The actual saving is removed from angriff and will be the responsibility of the patch author. But with pool it's dead simple. It's a bit difficult to explain in words, though, so I'll better attach an example:
tester.pd is the main patch, that uses the pool-abs abstraction two times. Each pool-abs contains a named pool object, that gets its name from the first argument ($0-storage in example). The second argument is just a key that makes both abstractions use unique names, so that you can store different settings in each.
tester.pd also has a named pool object, that bares the same name as the other two pools. This creates a magic global and instantaneous connection between all the pools (like the tunneling effect in quantum physics)
So all saving of all used patches can be done in a central place. Dave MacCallum had to overcome a lot of ugly obstacles to do largely the same just with builtin objects in his reworked d-angriff patches and a lot of other patches, but with pool it's so much more simple, that it's worth the extra external. Dave, don't you agree after seeing the attached example?
In the end angriff et al. will make use of pool hierarchies but that's too much to explain here and now.
Frank Barknecht _ ______footils.org__