[Seaside] some comments on the seaside port for dolphin

Martin Rubi mrubi at fibertel.com.ar
Wed Jun 14 19:06:02 UTC 2006

Hello everybody.
First of all, my apologies if some of the comments were reported already.
This week I started to play a little with the Seaside port for Dolphin, and a few comments came to mind:

1) When the current Seaside.pac is loaded, it creates a circular dependency between Seaside and Dolphin, making it impossible to save modifications or unload almost every package in the image. This is because the package loose methods are no loaded as such. I've made 2 small modifications to the class DolphinPackageExporter to (hopefully) solve this: 

 self fileOutPackageInformation.
 self fileOutClassNames.
 self fileOutLooseMethodsNames. "added by me"
 self fileOutPrerequisites.
 super fileOut

 stream cr; cr; nextPutAll: 'package methodNames'.

 self sortedMethods 
  select: [:ref | ref category first = $*]
  thenDo: [:ref |
    nextPutAll: 'add: ', 
       ref classSymbol printString, 
       ' -> ', 
       ref methodSymbol printString, 

 stream cr; nextPutAll: 'yourself.'.

2) I have also added the method
DolphinPackageExporter>>fileOutInitializerForClass: aClass
    "do nothing"

because the initialization was happening twice. This, however, does not happen in the current Seaside.pac available from the web, so maybe my Squeak image is a mess.

3) The package Seaside-Dolphin.pac contains the method
^self argumentCount = 1
I think it should say
^self argumentCount = 0

I saw a manifestation of this possible error when I tried to use scriptaculous in Dolphin.

4) While using scriptaculous, I detected what could be a possible semantic difference in the class MessageSend. For instance, in the method

SUAjax>>on: aSelector of: anObject
            receiver: anObject
            selector: aSelector)

aMessageSend is created, and then it's evaluated with 1 argument. However, Dolphin seems to need the MessageSend to be created with (at least) one argument in order to be correctly evaluated later, so I changed it to 

SUAjax>>on: aSelector of: anObject
            receiver: anObject
            selector: aSelector
            argument: nil)

This was only a problem for scriptaculous, I didn't see an error in Seaside due to this, but it seems to be something to be aware of.

5) Finally, I exported scriptaculous using the DolphinPackageExporter, and with minor (and trivial) fixes could make the examples work. I added a class 

ScriptaculousVWInfo subclass: #ScriptaculousDolphinInfo
 instanceVariableNames: ''
 classVariableNames: ''
 poolDictionaries: ''
 category: 'Scriptaculous-Platform'

which is pretty much c&p from SeasideDolphinInfo, beeing the #packageName the only modification I made. Although it worked, I guess my c&p is not the best approach, and perhaps there are details to be considered when writting such a class.

Well, that's all. Seaside and Scriptaculous looks like a lot of fun, by the way.

best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20060614/a6dae9dd/attachment.htm

More information about the Seaside mailing list