[ENH] pluggable server action directory

Stephane Ducasse ducasse at iam.unibe.ch
Thu Aug 9 08:01:50 UTC 2001


I trying to set up a wiki on my local machine without much success but I
will retry with a real  net.

I want to write a small colunn on how to set up your own SWiki. The problem
I see right now is that the people have to recompile the serverDirectory
method. Have anybody ever thought to put a class instance variable and
define three methods. This way we could have a 'scriptable' Swiki without
having to recompile anything. Was there a reason not to do it?


'From Squeak3.0 of 4 February 2001 [latest update: #3552] on 8 August 2001
at 10:05:19 pm'!
ServerAction class
    instanceVariableNames: 'serverDirectory '!

!ServerAction class methodsFor: 'System Services' stamp: 'SD 8/8/2001
21:59'!
pathSeparator
      ^String with: FileDirectory pathNameDelimiter
! !

!ServerAction class methodsFor: 'System Services' stamp: 'SD 8/8/2001
21:59'!
serverDirectory
    ^ serverDirectory
! !

!ServerAction class methodsFor: 'System Services' stamp: 'SD 8/8/2001
22:01'!
serverDirectory: aString
    
    aString last asString = self pathSeparator
        ifFalse: [ self error: 'the server directory path should end with a
path separator'].
    "we could put it automatically too"
    serverDirectory := aString
! !

!ServerAction class methodsFor: 'initialize-release' stamp: 'SD 8/8/2001
22:04'!
initialize

    serverDirectory := self serverDirectory: 'Home:MyDir:'! !

ServerAction initialize!

-------------- next part --------------
'From Squeak3.0 of 4 February 2001 [latest update: #3552] on 8 August 2001 at 10:05:19 pm'!ServerAction class	instanceVariableNames: 'serverDirectory '!!ServerAction class methodsFor: 'System Services' stamp: 'SD 8/8/2001 21:59'!pathSeparator  	^String with: FileDirectory pathNameDelimiter! !!ServerAction class methodsFor: 'System Services' stamp: 'SD 8/8/2001 21:59'!serverDirectory	^ serverDirectory! !!ServerAction class methodsFor: 'System Services' stamp: 'SD 8/8/2001 22:01'!serverDirectory: aString		aString last asString = self pathSeparator		ifFalse: [ self error: 'the server directory path should end with a path separator'].	"we could put it automatically too"	serverDirectory := aString! !!ServerAction class methodsFor: 'initialize-release' stamp: 'SD 8/8/2001 22:04'!initialize	serverDirectory := self serverDirectory: 'Home:MyDir:'! !ServerAction initialize!


More information about the Squeak-dev mailing list