Samir Saidani wrote:
Hi,
I've just posted the latest release of SmallWiki 1 on squeakmap, with
various enhancements and bug fixes (Hierarchical Menu and a bug fix
suggested by Adrien, see log files from squeaksource and previous
posts). This release seems to work with Squeak 3.8, and with the new
version of smallwiki (SW2), this release will probably be the latest
release of SW1.
Regards,
Samir
Hi Samir,
I've just looked at your new version. Thanks for still bug fixing
SmallWiki 1.
What exactly is the difference between Menu and the Hierarchical Menu?
I'm developing a file based logging storage mechanism for SmallWiki 1
and thereby I found two bugs in the SmallWiki 1.
1. If you rename a structure, the title of the predecessor will be
changed too
I changed SWEditAction title: to
title: aString
title := aString.
and SWEditAction privatePreSave to
privatePreSave
structure nextVersion: self request.
[ (self structure renameTo: self title) ifTrue: [ self
target: nil ] ]
on: SWDuplicatedStructure
do: [ :err | self exception: err ].
so only the new structure gets the new name
2. If you revert or restore a version of a structure which has another
name than the current version, the children Dictionary of the parent and
the links will not be updated. To make it work SWStructure
nextVersionBecome: could be changed like this:
nextVersionBecome: newStructure
| sCopy |
self class == newStructure class ifFalse: [self error: 'Unable
to version class changes in history.'].
sCopy := self copy.
1 to: newStructure class instSize do:
[:i | self instVarAt: i put: (newStructure instVarAt: i).
].
self predecessor: sCopy.
self version: sCopy version + 1.
self timestamp: TimeStamp current.
self localPropertyAt: #checked put: false.
self parent: sCopy parent.
(sCopy title = newStructure title) ifFalse: [
self hasParent ifTrue: [
self parent remove: sCopy.self parent add: self.
SWVisitorLinkInternal
block: [ :link |
(sCopy title = link reference)
ifTrue: [
link reference: self title ] ]
start: self root.
]
].
^self
Regards,
Thomas