Newbie - how to I access an object with rel path
Hello, My site is structured with folders. Some scripts are positioned in same directory. example: LoginScripts folder: checkSession checkUserName .... If I want to use script1 from script2, I write this: result=context.LoginScripts.script1() But is exists another way to I access it ? like this: result=./script1() Thanx. -- Best regards, fowlertrainer mailto:fowlertrainer@anonym.hu
I strongly recommend reading the API reference -> restrictedTraverse(). -aj --On Donnerstag, 4. Dezember 2003 14:04 Uhr +0100 fowlertrainer@anonym.hu wrote:
Hello,
My site is structured with folders. Some scripts are positioned in same directory.
example:
LoginScripts folder: checkSession checkUserName ....
If I want to use script1 from script2, I write this:
result=context.LoginScripts.script1()
But is exists another way to I access it ?
like this:
result=./script1()
Thanx.
On Thu, Dec 04, 2003 at 02:04:59PM +0100, fowlertrainer@anonym.hu wrote:
Hello,
My site is structured with folders. Some scripts are positioned in same directory.
example:
LoginScripts folder: checkSession checkUserName ....
If I want to use script1 from script2, I write this:
result=context.LoginScripts.script1()
But is exists another way to I access it ?
result=container.script1() -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's PROFESSOR-RECEIVER! (random hero from isometric.spaceninja.com)
As long as its within the context... Because of acquisition you dont have to fully qualify your reference to the script. You can just write result=context.script1(context, request) --- fowlertrainer@anonym.hu wrote:
Hello,
My site is structured with folders. Some scripts are positioned in same directory.
example:
LoginScripts folder: checkSession checkUserName ....
If I want to use script1 from script2, I write this:
result=context.LoginScripts.script1()
But is exists another way to I access it ?
like this:
result=./script1()
Thanx.
-- Best regards, fowlertrainer mailto:fowlertrainer@anonym.hu
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (4)
-
Andreas Jung -
Declan Shanaghy -
fowlertrainerļ¼ anonym.hu -
Paul Winkler