I've just put out TiddlyWeb 0.9.13 (
http://twitter.com/tiddlyweb/status/1216991081
) to the usual places but I wanted to point out a fairly fundamental
change. The summary goes like this:
It used to be that it was considered safe to perform a get on the
store as follows
store = Store('text')
bag = Bag('foo')
store.get(bag)
and then expect bag to be populated with the information from the
store. Now it is important to do this instead:
store = Store('text')
bag = Bag('foo')
bag = store.get(bag) # or use populated_bag = store.get(bag) to be
explicit
That is: in order to safely get a populated object from a store you
must use the return value from the get call and not rely on the
(possible) side effect of the bag object being passed to get.
I've updated the code I've written so that it does the write thing. If
you have written your own TiddlyWeb code that calls store.get and you
want to be up to date you should make the necessary adjustments.
The back story can be deduced, if you're feeling inclined, by looking
at the change history of a caching store[1] plugin I tried to write
over the weekend. The changes described above make it possible. I
explored many options before choosing to change the StorageInterface.
It seemed the least complex change while still granting the new power
of wrapping the storage system.
If you want more details on all this, feel free to contact me.
[1]
http://svn.tiddlywiki.org/Trunk/contributors/ChrisDent/experimental/tiddlyweb-plugins/caching-store/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/TiddlyWikiDev?hl=en
-~----------~----~----~----~------~----~------~--~---