Our "evolution customer", Heinz Richner, wrote:
>
> It would actually be good to have no lines, this would simply require
> that the column spacing can be controlled and enhanced
>
Is this possible?
> Thanks, I don't worry about the changes due to your experiments, I am
> rather interested in the evolution of the smallwicki over time.
>
:-)
Markus
> http://evolution.unibe.ch
>
> Heinz RICHNER
> Institute of Zoology - Evolutionary Ecology
> University of Bern, Baltzerstr.6
> CH-3012 Bern, Switzerland
>
> Tel 0041 31 631 3009 (S.Maurer, secretary)
> Fax 0041 31 631 3008
Hi David,
as there was no SmallWiki meeting today I am giving the code-review I
prepared using e-mail else it gets out-dated. If you have any
questions, please ask.
- Get rid of #isKindOf:
- Don't emit html-tags manually using "html text: '<b>Role:</b>'" as
this does not allow to render to another output format. Furthermore the
b-tag is depreciated and won't validate for HTML4 or XHTML. Either use
"html strong: 'Role:'" or much better "html spanClass: 'label' with:
'Role:'" instead.
- Don't emit html-characters manually using "html text: '&nsbsp;'" as
this does not allow to render to another output format. Use "html
space" instead.
- It is much simpler to use "html cssClass: 'label'" instead of "html
attributeAt: 'class' put: 'label'".
- Please don't use JavaScript, as it does not work on my machine
even-tough I have enabled it. It is easily possible to replace it with
server-side logic.
- Don't return associations of strings in AdminAction
class>>defaultMenu with tile and the url-postfix, but the actions
classes. All actions in SmallWiki are able to return their title and
know much better how to build their action-url than your code does.
- The class name of AdminAttachments doesn't seem to match what the
action is actually doing.
- AdminAttachments class>>generate_id: should be renamed to
AdminAttachments class>>generateId: as the underscore is not portable
to other Smalltalk dialects.
- Furthermore AdminAttachments class>>generate_id: should be moved to
Structure as it has nothing to do with the action-class and basically
works on a structure.
- Last but not least, you shouldn't need to use AdminAttachments
class>>generate_id: at all. As far as I understand you are building and
parsing this id to identify structures within a wiki. If you use
hidden-fields it is possible to pass objects from one action to the
other and you do not have to deal with strings, this is much simpler
and cleaner.
- I haven't implemented the read-accessor of User>>password
intentionally, because it is planned to store the password as a
hash-value instead of plain-text later on. This is a security issue to
have the password accessible like that and to render it when editing
users. It is the responsibility of the user-class to validate the
user-password using the message #validatePassword: and it should not be
accessible form outside.
- The following sections are some things that are basically reported by
SmallLint or things that I think could have been written simpler. I've
not tested the code I am suggesting, but it should work more or less:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Structure>>rolesIncludes: aRole
"check if a role is contained in a roles collection"
roles notNil ifTrue: [^roles includes: aRole].
^false
==>
Structure>>rolesIncludes: aRole
^roles notNil and: [ roles includes: aRole ]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Structure>>roleWithName: aRoleName
"returns a role with certain name"
self rolesDo: [:role | role name = aRoleName ifTrue: [^role]].
^nil
==>
Structure>>roleWithName: aString
self roles
detect: [ :each | each name = aString ]
ifNone: [ nil ]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Structure>>selfAndAllChildren
"return all children and their children.... as collection
- at this point: just return self in a collection "
| collection |
(collection := OrderedCollection new) add: self.
^collection
==>
Structure>>withChildren
^OrderedCollection with: self
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
X>>foo
X bar
==>
X>>foo
self class bar
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
AdminAction class>>defaultSeparator
"return the default string separator
- this seperator is used to generate the input fields of the
form"
^String new writeStream tab contents
==>
AdminAction class>>defaultSeparator
^String with: Character tab
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
AdminAction>>cutStructure: aStructureToDelete ofSelfAndChildrenOf:
aStructure
"cut the indicated structure out of the tree, if the paste destination
was not in its subtree"
| errorStream myParents |
errorStream := String new writeStream.
myParents := aStructure parents copy.
(myParents includes: aStructureToDelete)
ifFalse:
[self deleteStructure: aStructureToDelete OfSelfAndChildrenOf: self
server root]
ifTrue:
[errorStream
nextPutAll: '--> Paste of ''';
nextPutAll: aStructureToDelete title;
nextPutAll: ''' was ok, but can not cut: destination is
sub-structure of the element to be pasted!'.
self error: errorStream contents]
==>
AdminAction>>cutStructure: aStructureToDelete ofSelfAndChildrenOf:
aStructure
...
self error: (String streamContents: [ :stream |
stream nextPutAll: ' ... ])
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
CharacterArray>>asArrayOfSubstrings
"split the string at its seperators and return array with substrings"
| first last collection |
collection := OrderedCollection new.
last := 0.
[first := self findFirst: [:char | char isSeparator not]
startingAt: last + 1.
first ~= 0]
whileTrue:
[last := (self
findFirst: [:char | char isSeparator]
startingAt: first) - 1.
last < 0 ifTrue: [last := self size].
collection add: (self copyFrom: first to: last)].
^collection asArray
==>
CharacterArray>>asArrayOfSubstrings
^self runsSatisfying: [ :each | each isSeparator ]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Cheers,
Lukas
--
Lukas Renggli
http://renggli.freezope.org
Hi,
these are some things that I missed or left out yesterday:
Tudor Girba <girba(a)iam.unibe.ch>:
> 1. In the morning I manage to have a table by putting | (now it does
> not seem to work anymore). I saw that the <td> has no tags inside,
> therefore it is not possible to have padding or margin css options for
> the text in a cell. I suggest to have a <div class="tableCell"> there.
What about overloading the table-tags? This has the same effect as if I
put a <div class="tableCell"> into every cell, right?
> 2. Also, the head line of the table has an extra <b> tag. I suggest to
> replace it with another <div class="tableHeader">, so that we do not
> overload the <b> tag.
Where exactly have you seen that <b> tag? It should definitely go away
(as explained in the other mail) ...
> Stéphane Ducasse <ducasse(a)iam.unibe.ch>:
>
>> Apparently it is:
>> On the wiki root page I tried to add the */FolderTest* but I got
>> unable to get non-local structure :)
>
> It is only possible to create new structures on-line (from within the
> page) when using simple links without any slashes (e.g. *FolderTest*).
Actually I decided to write the on-line creation of new structures like
this, because else I would have needed to implement a different look-up
to get the parent of the ling-string (or done some other dirty tricks).
Of course it is possible to add that feature ...
Btw, David, when loading your enhancements my test
StructureTests>>testRoles breaks, what is something that should usually
not happen. Another problem is that loading your code makes SmallWiki
suddenly behave very restrictive with permission, e.g. it is not
possible to view or edit any page without logging-in.
Cheers,
Lukas
--
Lukas Renggli
http://renggli.freezope.org
Hi,
I played a bit with the css to make Smallwiki modify the look of a wiki
page and came over the following issues:
1. In the morning I manage to have a table by putting | (now it does
not seem to work anymore). I saw that the <td> has no tags inside,
therefore it is not possible to have padding or margin css options for
the text in a cell. I suggest to have a <div class="tableCell"> there.
2. Also, the head line of the table has an extra <b> tag. I suggest to
replace it with another <div class="tableHeader">, so that we do not
overload the <b> tag.
3. As I understood there is a new version of SmallWiki running of
kilana. Unfortunately, the tables are not rendered anymore. (see
http://kilana.unibe.ch:9090/TudorGirbaSmallWiki/?action=PageView )
Doru.
--
Tudor Adrian Girba Software Composition Group
(www.iam.unibe.ch/~girba) University of Bern, Switzerland
"Problem solving efficiency grows with the abstractness level
of problem understanding."
Hi,
I did some minor changes in a hurry over the last few weeks, now I
published the changes to Cincom and SCG StORE. It should solve most of
the problems reported in the mailing-list ...
> I had the problem that Squeak Changesets don't sort the initialize
> messages of some classes in the right order and it happend that after
> init the subclasses of Structure, the later init of Structure itself
> destroyed the inits before.
I changed the code according the suggestion.
> Swazoo.HTTPPostDataArray>>keysAndValuesDo: aBlock
> self associations do: [:anAssoc | aBlock value: anAssoc key value:
> anAssoc value]
This seems to be the result of another bug in StORE. I updated Swazoo
to the latest version a few weeks ago and obviously the message
#keysAndValuesDo: has been removed, but StORE kept it in my developer
image. I changed the code in SmallWiki to adapt the new version.
> - #internal_templates contains $_
#internal_template is now renamed to #internalTemplate.
Cheers,
Lukas
--
Lukas Renggli
http://renggli.freezope.org
Hi lukas
I restarted to read SmallWiki code because I lost the changes of my
previous image.
Anyway, if I understand correctly there are permissions and users.
Permission are grants to perform action.
A role contains a list of permissions.
A user play certain roles.
Before performing an action, sw checks whether the user has the right
permissions obtained
by playing a certain role.
Now the structure itself is not involved, this means that if I want to
have a special page that only a certain person can edit but everybody
else cannot I have to create a special role for that. Am I correct? Or
is it possible to grant permission at the instance level like a page?
For example how do I say that a folder can only be edited by admin or
User X, or a person playing the role editFolderX?
Stef
>>
>
> That is encouraging (more than the comments in the package header on
> Squeakmap!)
chris could you be explicit about the difference between
SmallWiki/Squeak and SmallWiki/VW in the package on Squeak Map because
it would be bad that people think that SmallWiki in general is bad.
> I would guess it just needs a bit more testing on squeak.
Yes
> I hope others can do it because I just don't have the bandwidth now
> and VW
> is not an option. Maybe there are not serious problems past this first
> one
> I encountered.
I hope :)
> As I said, I think SmallWiki would fit perfectly into my current
> project,
> as a help system. It even looks very similar in some ways to my
> application web pages.
Excellent then.
> I also like that I'd probably be able to integrate it closely within my
> app because I can tap into smalltalk more easily in the pages.
let us know
Stef
Begin forwarded message:
> From: ducasse <ducasse(a)iam.unibe.ch>
> Date: Jeu nov 6, 2003 17:37:34 Europe/Zurich
> To: The general-purpose Squeak developers list
> <squeak-dev(a)lists.squeakfoundation.org>
> Cc: Lukas Renggli <renggli(a)student.unibe.ch>
> Subject: Re: swiki, commanche , 3.6, network rewrite, oh my
> Reply-To: The general-purpose Squeak developers list
> <squeak-dev(a)lists.squeakfoundation.org>
>
>
> On Jeudi, nov 6, 2003, at 17:14 Europe/Zurich, ar wrote:
>
>> Stephen,
>>
>> Thanks for filling in some of the gaps for me.
>>
>>> My advice is to load Comanche 6.2
>>> (KomHttpServer on SqueakMap) and try out the SmallWiki package and
>>> see
>>> if it will meet your needs. If you want to stick with the old Swiki,
>>> then my advice is to download and use one of the pre-configured
>>> images
>>> for ComSwiki and don't use Comanche 6.2 or Squeak 3.6.
>>
>> SmallWiki looks like it would fit my needs nicely if if were stable
>> enough.
> It is stable we runs since 3 months. Now certain aspects are
> rudimentary.
>
>> Then I can save myself (actually the host of my UML linux box)
>> the extra 6M or so of ram to run swiki separately from my main image,
>> or
>> my gray hairs trying to getting it running in 3.6.
>>
>> But whereas swiki has been absolutely rock-solid, it looks like
>> Squeak/
>> Smallwiki might need some seasoning yet.
>
> About Swiki: here we wrote a perl watch-dog and we avoid to change the
> vm because
> it was crashing so much that once people were thinking to change to a
> python solution, so nothing
> is as simple as it looks.
>
>> On the initial page, I tried changing the title of the page from
>> 'Smallwiki'. Without touching the page content, I pressed save and
>> got and
>> error in SWWikiScanner>>step, where it is trying to put a string to a
>> WriteStream built on a string. This is because the input steam
>> contents are an OrderedCollection on the page content string
>> instead of the page content string itself. Can anyone reproduce this?
>
> What I can tell you is that:
> - first we do not know the exact result of the port from VW to Squeak
> Chris did an excellent job but we did not try it yet because lukas is
> FLOODED by lectures
> - second I suggest you to have a look at the current VW version
> because more things will be coming.
> - third, SmallWiki has a good design and is ready to accept
> extensions and plugging
> so feel free to contribute. We did it for that.
>
> Stef
>
>
Begin forwarded message:
> From: ar <ly4aegw02(a)sneakemail.com>
> Date: Jeu nov 6, 2003 17:14:41 Europe/Zurich
> To: squeak-dev(a)lists.squeakfoundation.org
> Subject: Re: swiki, commanche , 3.6, network rewrite, oh my
> Reply-To: The general-purpose Squeak developers list
> <squeak-dev(a)lists.squeakfoundation.org>
>
> Stephen,
>
> Thanks for filling in some of the gaps for me.
>
>> My advice is to load Comanche 6.2
>> (KomHttpServer on SqueakMap) and try out the SmallWiki package and see
>> if it will meet your needs. If you want to stick with the old Swiki,
>> then my advice is to download and use one of the pre-configured images
>> for ComSwiki and don't use Comanche 6.2 or Squeak 3.6.
>
> SmallWiki looks like it would fit my needs nicely if if were stable
> enough. Then I can save myself (actually the host of my UML linux box)
> the extra 6M or so of ram to run swiki separately from my main image,
> or
> my gray hairs trying to getting it running in 3.6.
>
> But whereas swiki has been absolutely rock-solid, it looks like Squeak/
> Smallwiki might need some seasoning yet.
>
> On the initial page, I tried changing the title of the page from
> 'Smallwiki'. Without touching the page content, I pressed save and got
> and
> error in SWWikiScanner>>step, where it is trying to put a string to a
> WriteStream built on a string. This is because the input steam
> contents are an OrderedCollection on the page content string
> instead of the page content string itself. Can anyone reproduce this?
>
>
>
Hi,
I have put my work on SmallWiki 0.9.20 for Squeak on SqueakMap
[1]. I hope that someone of you can help me with the last problems:
- the failing tests (related to the compiler)
- copying Exceptions for debugging (related to method contexts)
You can see this by starting SmallWiki and then performing
a simple Search.
Please report any ideas/bugs related to the Squeak Port to me.
Lukas has enough work to do :)
thanks
Chris Burkert
1:
http://map1.squeakfoundation.org/sm/package/93cd10ce-b8e1-4d4b-8566-fe40000…
--
http://www.chrisburkert.de/