O.K. I'll admit I am feeling a little stupid here but I just
don't understand this. All I wanted to do was include my script
library file using the OnRequestStart function within
application.cfm. There isn't anything special in the _ScriptLib.cfm
template. My Application.cfc file looks like this... (Only the
pertinent portions are included)
<CFFUNCTION NAME="onRequestStart" OUTPUT="Yes"
... (other CFSETS and junk like that)
My question is why do I need to add the CFArgument tag in the
OnRequest function to include my scripts??? You don't need to add the cfargument tag to onRequest to
enable you to use cfinclude in OnRequestStart. In this case, the
only musts are:
if you implement the OnRequest method, then it must load the
target-page through a cfargument tag and it must explicitly call
the page through a cfinclude tag.
That makes the Variables scope of the requested page (and its
included pages!) available in OnRequestStart. If a variable is
called x in the requested page, you may just call it x in
OnRequestStart. If you hadn't included the cfargument and cfinclude
tags in OnRequest, or if you didn't iimplement the OnRequest method
at all, the only page variables you would have access to in
OnRequestStart are those in Request scope.