That's most likely what happened...

-----Original Message-----
From: Andrew Scott [mailto:andr...@andyscott.id.au] 
Sent: Thursday, August 12, 2010 2:31 PM
To: cf-talk
Subject: RE: Trying to understand application.cfc...


Rick,

Is it highly possible that you had run the application, and then placed that
code into onApplicationStart? If this is the case then the undefined
variable would make sense, and why it works for you now.

Regards,
Andrew Scott
http://www.andyscott.id.au/


> -----Original Message-----
> From: Rick Faircloth [mailto:r...@whitestonemedia.com]
> Sent: Friday, 13 August 2010 4:31 AM
> To: cf-talk
> Subject: RE: Trying to understand application.cfc...
> 
> 
> Thanks for the reply, Jason...
> 
> Well...I swear, the first time I tried to set application.website inside
> onApplicationStart, I got an error saying application.website wasn't
defined.
> Now, for some reason, it works.
> 
> The only thing I added was output="false" as you have in your example.
> 
> At first, I used:
> 
> <cfcomponent>
> 
>       <cfset this.name = "siteManager">
>       <cfset this.sessionManagement = true>
>       <cfset this.sessionTimeout = "#createTimeSpan(0,1,0,0)#">
>       <cfset this.applicationTimeout = "#createTimeSpan(1,0,0,0)#">
> 
>       <cffunction name = "onApplicationStart">
> 
>               <cfset application.website = "RickFaircloth.com">
> 
>       </cffunction>
> 
> </cfcomponent>
> 
> Any wrong or missing?
> 
> 
> 
> -----Original Message-----
> From: Jason Fisher [mailto:ja...@wanax.com]
> Sent: Thursday, August 12, 2010 2:17 PM
> To: cf-talk
> Subject: re: Trying to understand application.cfc...
> 
> 
> I do exactly that, Rick, and it works fine.  All my app vars are set in
> onApplicationStart, except for the constants like 'name', which I set
> outside the methods:
> 
> 
> 
> <cfcomponent output="false">
> 
>       <cfscript>
>       this.name = "myAppName";
>       this.applicationTimeout = createTimeSpan(0, 8, 0, 0);
>       ...
>       </cfscript>
> 
>       <cffunction name = "onApplicationStart">
>               <cfset application.dsn= "myDatasource">
>       </cffunction>
> 
> 
> 
> 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~|
> Order the Adobe Coldfusion Anthology now!
> http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-
> Dinowitz/dp/1430272155/?tag=houseoffusion
> Archive: http://www.houseoffusion.com/groups/cf-
> talk/message.cfm/messageid:336236
> Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
> Unsubscribe: http://www.houseoffusion.com/groups/cf-
> talk/unsubscribe.cfm




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336242
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to