would:
<cfset request.myPageRequest =
CreateObject("component","prototype.entity.systemsforge.PageRequest").Init()>
not
the best "OO" practice I suspect...
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Bell
Sent: Monday, 27 February 2006 11:13 a.m.
To: [email protected]
Subject: [CFCDev] Simple Scoping QuestionHi There,Sorry for such a basic question, but if I want to create a page request specific object in onRequestStart (in application.cfc) which will contain a bunch of properties I need access to whether I'm using a browser or flash remoting to access the application, how do I access the created object?I have:<cffunction name="onRequestStart" returntype="boolean" access="public" output="no" displayname="Request pre-processor" hint="This method sets any variables that are always required on a request level.">
<cfset myPageRequest = CreateObject("component","prototype.entity.systemsforge.PageRequest")Init()><cfreturn true>
</cffunction>If I want to access the object (say in index.cfm - the main page), how do I access it? Lets say I wanted to dump the contents:<cfdump var="#myPageRequest#"> obviously fails<cfdump var="#Request.myPageRequest#"> failsIt isn't app scoped, so I am glad to report that <cfdump var="#application.myPageRequest#"> also failsHow DO I access it, given that I can't explicitly pass it (because onRequestStart can only return a boolean).I'm sure this is extremely simple and obvious. Any input appreciated!Best Wishes,
Peter----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
This e-mail message has been scanned by MailMarshal from Marshal Software, an email content filter.
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
