Stick it in application scope. Use code like this in Application.cfm:I still think I am trying to get my head around the Page Context bug......
.....and I dont understand why your example does not trigger that bug or
some derivative of it ?
You only fall foul of the page context bug if you try to access shared scopes or perform output from your CFC (in shared scope). Since those are not 'best practice' you might well not run into the bug :)
By that I mean, I assume from the code sample that it is more than OK to
create an instance-based CFC in the Application (or any other) scope - but
it is not OK for the CFC to assume that the Application scope is
initialised properly if it is accessed from within the CFC?
I'm not entirely sure what you mean. My team create CFC instances in shared scopes all the time without problems - but we never reference our 'environment' from an instance stored in a shared scope.
Sean A Corfield -- http://www.corfield.org/blog/
"If you're not annoying somebody, you're not really alive." -- Margaret Atwood
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
