Mischa, you say, "Instantiating application.cfc does not throw an error, but
also doesn't set my application vars :(" 

Just to be clear, are you just instantiating it (such as with CFObject or
CreateObject)? Or are you also invoking a method (after one of the above, or
using CFINVOKE)? While the implicit invocation that happens on page request
does that for you, naturally if you are doing it explicitly you need to pick
a method. 

The interesting/unfortunate challenge is that you'd need to certainly run
onRequestStart, but you'd also need to run OnApplicationStart (since you
know it's not being run for you implicitly and that's where I assume you're
setting your application vars) and possibly OnSessionStart. 

I realize it will "feel weird" to contemplate running those, and one could
argue, "you need to be careful not to run those if the app or session has
already started", but remember that Mischa's challenge is that in the
missing template page processing he's observed that the application.cfc
doesn't seem to run. (Actually, you said that it does not run for CFM pages,
but does for HTM pages, which certainly seems odd. It would seem, then, that
you need to dynamically determine in the missing template handler when it is
so that the application.cfc did not run, and only invoke these methods
then.)

Again, though, it all sounds like a bug so hopefully your report to Adobe
will yield fruit. Let us all know how it goes.

/charlie

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mischa
Uppelschoten ext 10
Sent: Wednesday, May 10, 2006 2:07 PM
To: discussion@acfug.org
Subject: re[6]: [ACFUG Discuss] Missing template handler does not have
access to application scope?

<snip>
With application.cfc, I don't know if the same notion exists: could you
invoke it manually? May be worth a try, at least while you await a reply on
its automatic processing.

** I actually did try setting my application vars manually within the
page-not-found.cfm page, and that does work, however that means duplicating
most of my variable assignments and decreases maintainability of the app.
Instantiating application.cfc does not throw an error, but also doesn't set
my application vars :(

Thanks for your help, I'll let you know if Adobe comes back with anything
helpful.
/m




--------------------------------------------------------
* To unsubscribe from this list, manage your profile @ *
* http://www.acfug.org?fa=login.edituserform           *
*                                                      *
* For more info, see http://www.acfug.org/mailinglists *
--------------------------------------------------------


Reply via email to