Pragma conversion update #3: dynamic non-caching descriptions

Nick Ager nick.ager at gmail.com
Wed Jan 18 18:01:01 MET 2012


Hi,

I've removed Magritte's description caching in the latest version so that
descriptions are now created dynamically on demand. Without the cache I
found I needed to guard against recursive descriptions and ended up using a
dynamic-variable as a temporary cache to break the recursion.

I had to modify one test to avoid a failure:

MADescriptionBuilderTest>>testRecursive
self assert: self magritteDescription children first reference = self
magritteDescription

The failure was caused by the child descriptions both having null accessors
which use random UUIDs so will never be equal. I fixed this by specify an
accessor: "accessor: MADictionaryAccessor new;"

I've created a Magritte-Deprecated package which contains:

MADescriptionBuilder
MANamedBuilder
MAProxyObject
MADynamicObject
MADynamicObjectTest

Also the following package extension methods have been placed in deprecated:
Object>>#description
Object class>>#description
BlockClosure>>#magritteDynamicObject
BlockContext>>#magritteDynamicObject

and I've removed all references to #magritteDynamicObject and the
associated block in the core Magritte packages.

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20120118/aaaae8e4/attachment-0001.html>


More information about the smallwiki mailing list