> the newer parser is pretty trivial work). It'll probably be easy to
> migrate a wiki back and forth between Gardner and SmallWiki since I
> think they use the same DOM in addition to the parser.
Exactly, SmallWiki is providing basically the same protocol for HTML
generation. However there are two things:
- Expressions like "html attributes align: #middle" are not supported
yet. You still have to do it the old-fashioned way "html attributeAt:
#align put: #middle". If someone wants that, it could be changed
easily.
- The callback-mechanism of SmallWiki is somehow different, as there is
no state in the components: therefor I have to pass into the
block/message some more information than just the current value.
Basically you register your callback either using a symbol or a block:
#messageWithAction:withValue:withMime:
(1) (2) (3)
or
[ :action :value :mime | self foo ...
(1) (2) (3) (4)
(1) points to the action where the callback is evaluated
(2) points to the value of the (input-)callback (this is what you get
from Seaside)
(3) points to the mime-code of the (input-)callback
(4) points to the action where the callback had been defined
If your SmallWiki block/message does not take all the arguments, they
are simply not given when evaluating.
Cheers,
Lukas
--
Lukas Renggli
http://renggli.freezope.org
hi all
after fighting more than one hour with freehand, i tried to do
everything in squeak and I like the results:
http://kilana.unibe.ch:9090/CaroAndBot/
Banners in SmallWiki are cool.
Stef
Hi
I put an additional question on the FAQ
How do I upload a style-sheet to my root folder as a resource?
I think I figured out the answer and wrote it on
http://kilana.unibe.ch:9090/SmallWiki/FAQ/
However it doesn't work.
I did change 'Template', link 'Stylesheet' to
@import "http://localhost:8080/StyleSheet";
What am I missing?
Hannes
P.S. I work with the Squeak version I got four days ago from SM.
P.S. 2 As a workaround I copy the whole style sheet at the moment into
the template box. It works fine but I do not feel at ease doing so.
Hi lukas
I created a page put resources in it then, I changed the title of the
page and in the page referring to it, the references were not found
anymore
I got resource, page, folder instaed of the linkn to the page. I
reedited the previous page to have the previous title and everything
worked well. I will show you because I can reproduce it.
Stef
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
I installed SmallWiki in Squeak today--I'm impressed!
Here are a couple of potential porting issues:
I found a call to OrderedCollection>>replaceAtIndex: that is #replaceAt:
in Squeak. The changeset showing the change is attached.
Also, I ran SmallLint methods sent but not implemented and found:
SWDocumentComposite>>postCopy sends super postCopy but no superclasses
of SWDocumentComposite implement it.
SWCode>>internalEvaluate:on:with: contains the following expression
which is not implemented:
^Compiler new
evaluate: anExpression
in: thisContext
allowReceiver: true
receiver: aStructure
environment: nil
notifying: nil
ifFail: [ nil ]
handler: SilentCompilerErrorHandler new
SWPropertyManager>>postCopy also calls super postCopy which is not
implemented.
SWSIXXStorage>>directoryTime sends hour to TimeStamp now, but TimeStamp
doesn't implement hour.
SWStructure>>postCopy sends super postCopy, which is not implemented.
SWServer>>emitContext:on: sends aContext localScope, which is not
implemented.
SWBasicRole>>postCopy sends super postCopy which is not implemented.
There is a class SWDocumentComposit, possibly a typo from
SWDocumentComposite, but has some differences in methods. Also it's
postCopy sends super postCopy, which is not implemented.
SWText>>postCopy sends super postCopy, which is not implemented.
I installed SmallWiki in Squeak today--I'm impressed! Thanks for sharing
this.
When trying to get SmallWiki started, I found that the method in the
attached changeset was sending #removeAtIndex: instead of #removeAt: to
an OrderedCollection instance.
After getting it up and running, I ran the SmallLint methods sent but
not implemented checks and found the following issues:
#postCopy should be implemented in Object. The following send super
postCopy but don't have any superClass that implements it:
SWUser
SWText
SWDocumentComposit
SWDocumentComposite
SWBasicRole
SWStructure
SWPropertyManager
SWDocumentComposit is probably a typographical
error--SWDocumentComposite was probably intended. It appears that
something strange is going on with these two similarly named classes.
SWSIXXStorage>>directoryTime sends #hour to a TimeStamp instance, which
is not implemented.
SWServer>>emitContext:on: sends #localScope which is not implemented.
SWCode>>internalEvaluate:on:with: sends
#evaluate:in:allowReceiver:receiver:environment:notifying:ifFail:handler: to a Compiler instance, which is not implemented.
-Mark
when searching Google for SmallWiki pages, only the views are indexed
and listed by the search-engine. Searching other wikis often gives
results that point to edit-, history- and changes-pages, usually not
the intention of the user.
http://www.google.com/search?q=site:kilana.unibe.ch+smallwiki
SmallWiki tags the pages to tell search-eninges, whether they should
index a page or whether they should just follow the links. Of course
this behaviour can be customized using the template editor.
Cheers,
Lukas
--
Lukas Renggli
http://renggli.freezope.org
Hi,
> I'm loading from public rep version 0,9,21.
this should be fixed in 0.9.22
Cheers,
Lukas
> it seems that there is package loading sequence problems, becouse i
> get an error when the system try do initialize
> the class SmallWiki.Structure. the method initializePermission has
> some undefined. Commenting it make the load procede.
>
> The problem is that initializePermission in Page class try to add a
> permission to the class instance var <permission>,
> but this one is nil, not some kind of collection.
>
> ciao
>
> Giorgio Ferraris
--
Lukas Renggli
http://renggli.freezope.org