No, I didn’t. That would have been a good debugging move.

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John C. Bland II
Sent: Wednesday, October 18, 2006 2:07 AM
To: [email protected]
Subject: Re: [CFCDEV] Ray Camden talks about CFC

 

No sweat Hal.

 

When you had it in the app scope, after the first run, did you force the function to run? (like a backdoor to force the INI to be read again)
 

On 10/17/06, Hal Helms <[EMAIL PROTECTED]> wrote:

Thanks for sharing that, John. I'm getting stuck somewhere else. First, let me see if I can replicate this; it happened a few days ago. I spent about 1.5 hours on it and then gave up and moved to XML.

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of John C. Bland II
Sent: Wednesday, October 18, 2006 1:44 AM
To: [email protected]
Subject: Re: [CFCDEV] Ray Camden talks about CFC

 

I started using INI's a few months back and wrote a lil' script to parse the entire INI. It even allows for hiding sections.

 

 

The base idea is to loop over all sections and add them to a struct. I call this from onAppStart and store my settings in the app scope. This is why I setup the 'private' key so it wouldn't automatically add my DSN value to the app scope (not good for shared environments).

 

Hopefully this helps a bit...
 

On 10/17/06, Dave Shuck <[EMAIL PROTECTED]> wrote:

Hal,

I don't usually do this in OnApplicationStart(), and I have never tried this in OnRequest(), but I use this technique in OnRequestStart() on many of my apps.

<cfif NOT StructKeyExists(application,"Settings")>
    <cflock name="#application.applicationname#_Settings" type="exclusive" timeout="30">   
        <cfif NOT StructKeyExists(application,"Settings")>
        <cfscript>
        application.Settings = StructNew();
        application.Settings.Dsn = GetProfileString(ExpandPath("/ini/settings.ini.cfm"),"Database","Dsn");
        application.Settings.SomeOtherStuff = GetProfileString(ExpandPath("/ini/settings.ini.cfm"),"General","SomeOtherStuff");
        // etc.......
        </cfscript>
        </cfif>
    </cflock>
</cfif>

I am a little interested in the fact that you were using an OnRequest() method at all. Given the unique rules which apply if that method exists in an Application.cfc, is it possible that it could be a factor?  I have never found myself in a place where it was appropriate to have that method in my Application.cfc.

~Dave

 

On 10/17/06, Hal Helms <[EMAIL PROTECTED]> wrote:

Here's something that confuses me about Application.cfc. I recently decided to put a bunch of initial stuff in an .ini file. But when I tried to read that (using GetProfileString) from within OnApplicationStart(), it ignored it completely. I tried everything I could think of, moved the code into onRequest, changed the ini layout so that it was bad (it never threw an error). Finally, I gave up and used an XML file, which worked fine. But was this something I did wrong or is there some odd bug in the processing of Application.cfc?

 

Hal

 

From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Phillip Senn
Sent: Tuesday, October 17, 2006 3:31 PM
To: [email protected]
Subject: [CFCDEV] Ray Camden talks about CFC

 

Ray Camden is going to do another presentation on Application.cfc Wednesday at 5 CST.

 

 

http://ray.camdenfamily.com/index.cfm/2006/10/12/CFJUG-October-MeetingLast-Recording#c57ACA8B5-F394-7281-4821DCAFD4CBE4B0

 

http://ray.camdenfamily.com/index.cfm/2006/9/27/ColdFusion-Jedi-User-Group-Meeting-Tonight

 

 


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]



--
~Dave Shuck
[EMAIL PROTECTED]
www.daveshuck.com

Where's your Spot?
www.instantspot.com


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]




--
John C. Bland II
Chief Geek
Katapult Media, Inc. - www.katapultmedia.com
---
Biz Blog - http://blogs.katapultmedia.com/jb2
Personal Blog - http://blog.blandfamilyonline.com
http://www.lifthimhigh.com - "Christian Products for Those Bold Enough to Wear Them"
Home of FMUG.az - http://www.gotoandstop.org
Home of AZCFUG - http://www.azcfug.org
You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]




--
John C. Bland II
Chief Geek
Katapult Media, Inc. - www.katapultmedia.com
---
Biz Blog - http://blogs.katapultmedia.com/jb2
Personal Blog - http://blog.blandfamilyonline.com
http://www.lifthimhigh.com - "Christian Products for Those Bold Enough to Wear Them"
Home of FMUG.az - http://www.gotoandstop.org
Home of AZCFUG - http://www.azcfug.org
You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to