Uuuuuhhhhh...

I thought so.

Essentially I have a situation like:

/com/CFC.cfc
/resource/config.xml

If I want CFC.cfc to read config.xml I have to write a expandPath from
the base template, rather than just being able to go
expandPath(../resource/config.xml).

The reason I can't is because I've basically build a Factory that
instantiates other CFCs as singletons upon their first request.

Since I don't know where the 1st request would come from, I was hoping
to avoid having to do a expands() from baseTemplatePath...

I hope that makes more sense.

Mark

On 5/18/05, Sean Corfield <[EMAIL PROTECTED]> wrote:
> On 5/17/05, Mark Mandel <[EMAIL PROTECTED]> wrote:
> > Normally I would pass in a path to a file that is to be read by a CFC
> > as an argument on the init function, but in this case, I can't.
> 
> But it sounds like you are passing the path in *somehow*...?
> 
> > So I'm noting that expandPath() works from a relative pathing from the
> > base template, not from the CFC's location.
> 
> Right.
> 
> > So - is there a way to run an expandPath() that instead of running
> > relative from the base template path, is instead run from the CFC
> > path?
> 
> No - it would be impossible to do so. If you don't know where the CFC
> is located (it could be under webroot, under a mapping or under any
> custom tag path) then how can it possibly know the relative path to a
> file that only you know about?
> 
> The solution is to call expandPath() in your own code and pass the
> full path into the CFC. If that isn't possible, could you explain why
> not?
> --
> Sean A Corfield -- http://corfield.org/
> Team Fusebox -- http://fusebox.org/
> Got Gmail? -- I have 50, yes 50, invites to give away!
> 
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
> 


-- 
E: [EMAIL PROTECTED]
W: www.compoundtheory.com
ICQ: 3094740

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to