Hi,
I did some cleaning today:
- I've updated the documentation on
http://kilana.unibe.ch:9090/SmallWiki and added a few tests.
- I removed the restriction to evaluate a call-back only once, because
this caused some confusion in certain cases. I observed several people
editing and viewing pages using the save-button and the back-button of
the browser: the problem there is that the save-callback is considered
to be evaluated several times, so this should work in a more convenient
way now.
- Structure>>references will return a set with all structures in the
wiki pointing to the receiver. Structure>>referencesStartingAt: will
do the same but the search will start at the given parameter. Try out
this feature by adding the component References to your wiki.
- When renaming a wiki-pages all references pointing to that page are
now correctly updated. However there is still a problem when a the
renamed structure appears in the middle of a path (only possible for
folders), in that case nothing is done automatically yet.
- I've introduced VisitorPluggable as a subclass of Visitor to make the
use of visitors more easily. This allowed to get rid of a few other
visitors. VisitorPluggable has the constructor #block:start: to get
everything started. There are currently two subclasses called
VisitorLinkInternal and VisitorStructure that both just evaluate the
block for the appropriate wiki-items. The re-factored hierarchy looks
now like seen on:
http://kilana.unibe.ch:9090/SmallWiki/SmallWikiVisitors.
As an example the two changes mentioned above are now implemented using
this kind of visitor:
Structure>>referencesStartingAt: aStructure
| collection |
collection := Set new.
VisitorLinkInternal
block: [ :link :structure |
self == link target
ifTrue: [ collection add: structure ] ]
start: aStructure.
^collection
Structure>>renameTo: aString
...
VisitorLinkInternal
block: [ :link | self == link target ifTrue: [ "fix link ..." ]
start: self root.
...
- The alt-attribute is now rendered correctly for images.
That's it for the moment (other things to do),
Lukas
--
Lukas Renggli
http://renggli.freezope.org