Programatic registration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Programatic registration

Jeff Gray
Is there a way to read the configuration of a seaside app and apply it to
another app?
I want to read the libraries and the session class that an app is using, and
register a new app that also references those same libraries and session
class.
 



--
Sent from: http://forum.world.st/Seaside-General-f86180.html
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
tty
Reply | Threaded
Open this post in threaded view
|

Re: Programatic registration

tty
Good morning.

besides [your installation url]/conf  the boilerplate method is to copy registration info from one class to anther.

For example. I just started this project http://192.34.129.31/SeasideDoc
and in my "root class" on the class side I have the 'register' method:

register

|app|
app := WAAdmin register: self asApplicationAt: 'SeasideDoc'.
app
addLibrary: SeasideDocLibrary;
preferenceAt: #sessionClass put: SeasideDocSession.


That was copy-n-paste from another project I am developing: http://192.34.129.31/zurb

with its "register' method:

register

|app|
app := WAAdmin register: self asApplicationAt: 'zurb'.
app
" addLibrary: ZurbDevelopmentLibrary;"
addLibrary: ZurbExamplesLibrary.

to invoke that, just open a Workspance and invoke the class method: "MyClass > register"

hth

---- On Tue, 28 Aug 2018 17:44:52 -0400 Jeff Gray <[hidden email]> wrote ----

Is there a way to read the configuration of a seaside app and apply it to
another app?
I want to read the libraries and the session class that an app is using, and
register a new app that also references those same libraries and session
class.




--
_______________________________________________
seaside mailing list



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Programatic registration

Jeff Gray
Thanks. That was just the leg up I needed. I was getting fixated on WAAdmin
and looking for all the methods to be there. Looking at your example,  now
I've been inspecting the WADispatcher and WAApplication classes it's all
becoming much clearer.
Nice work :-)



--
Sent from: http://forum.world.st/Seaside-General-f86180.html
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside