discovering an application's path

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

discovering an application's path

Nick
Hi,

I've come up with the following code to identify an application's dispatcher path:

| requestContext appPath dispatcher |
requestContext := self requestContext.
dispatcher := requestContext handlers detect: [ :each | each isDispatcher ] ifNone: [ nil ].
appPath := dispatcher isNil 
ifTrue: [ '' ]
ifFalse: [ dispatcher handlers keyAtValue: requestContext application ].

is there an easier/better way?

Thanks

Nick

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

Re: discovering an application's path

Julian Fitzell-2
I'm not quite sure what you mean by dispatcher path, but looking at what I think the code is returning, is the following the same or do you have something else in mind?

self application name

On Thu, Sep 1, 2011 at 11:41 PM, Nick Ager <[hidden email]> wrote:
Hi,

I've come up with the following code to identify an application's dispatcher path:

| requestContext appPath dispatcher |
requestContext := self requestContext.
dispatcher := requestContext handlers detect: [ :each | each isDispatcher ] ifNone: [ nil ].
appPath := dispatcher isNil 
ifTrue: [ '' ]
ifFalse: [ dispatcher handlers keyAtValue: requestContext application ].

is there an easier/better way?

Thanks

Nick

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



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

Re: discovering an application's path

Nick
Perfect, thanks Julian:
 
self application name

I thought there was an easier way


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

Re: discovering an application's path

Philippe Marschall
In reply to this post by Nick
2011/9/2 Nick Ager <[hidden email]>:

> Hi,
> I've come up with the following code to identify an application's dispatcher
> path:
> | requestContext appPath dispatcher |
> requestContext := self requestContext.
> dispatcher := requestContext handlers detect: [ :each | each isDispatcher ]
> ifNone: [ nil ].
> appPath := dispatcher isNil
> ifTrue: [ '' ]
> ifFalse: [ dispatcher handlers keyAtValue: requestContext application ].
> is there an easier/better way?

self application url?

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside