Reading cells source files, I noticed cells-store. I think it has something to do with hash tables, but nothing beside this. What's its purpose? How is a cells-store normally used?
Thanks in advance for an answer.
Hi Stefano,
A cells-store is a cells-aware data store. It is internally implemented on top of a hash table.
The idea is as follows: Imagine you have a cell which depends on a certain entry or the whole set of data in a table/database.
Several issues arise: - what if the entry does not yet exist at initialization time? - what if it is added later? - what if the entry is overwritten/deleted later? - what if the cell depends on the whole set of data and new data is added/existing data removed?
I invented the cells-store so that I won't have to worry about these things anymore.
Now you just use the bwhen-c-stored operator inside a (c? ...) clause, and everything behaves as you would expect. You can check out cells-store-test.lisp (or something like this) for a small example.
My core use case was GUI design: Some ruled cells of certain widgets depend on cells slots of other widgets, which might or might not exist at initialization time. So I keep all the widgets in a cells store, each identified by a unique name, and can just use bwhen-c-stored to refer to other widgets by name. If they don't exist, a default is used, and once they are initialized, the cell is executed, and everything behaves as expected.
HTH,
Peter
2008/8/26 Stefano Dissegna stefano.dissegna@gmail.com:
Reading cells source files, I noticed cells-store. I think it has something to do with hash tables, but nothing beside this. What's its purpose? How is a cells-store normally used?
Thanks in advance for an answer.
cells-devel site list cells-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/cells-devel