Wow, I just read what I wrote...it is like English but different. But if you lower your intelligence by a few notches, you just might get the jist. Sorry.
Andy -----Original Message----- From: Andy [mailto:[EMAIL PROTECTED] Sent: Sunday, September 18, 2005 12:49 PM To: CF-Talk Subject: RE: using an xml file for cfc settingsray style Dave, I have just started to use XML for file settings, so take this as a bigger's stab. I have about 80 lines in my application.cfc that sets things like file locations, menus, security context, etc. I am in the process of moving them into XML files, one for each environment (dev, test, production). I then just read, <CFFile>, the xml file in the <CFParse> into an XML structure which I same to Application.defaults. One of my defaults are Database settings (DSN, ID, Password) which I pass to each CFC when I initialize it ( testObj(UserKey=session.User.getUser(), Settings = application.defaults.settings) In my CFC's, I don't use "this" because that enables direct access to the variables. I use "instance": <cfset instance.Settings = arguments.Settings /> <cfset instance.UserKey = arguments.UserKey /> Then when I need to see something in the object, I use a get to receive it: <cfset seeInfo = testObj.getInfo /> Then in testObj I have <cffunction name="testObj" ... /> <cfreturn instance.AskedForInfo /> </cfFunction> If AskedForInfo is a structure, then I always return duplicate(instance.AskedForInfo) so that the user doesn't have direct access to the object. Hope this helps, Andy -----Original Message----- From: dave [mailto:[EMAIL PROTECTED] Sent: Friday, September 16, 2005 2:27 PM To: CF-Talk Subject: using an xml file for cfc settingsray style this ? is based off of raymond article on using ini or xml files for settings. I have 2 sites i am doing that need to share the same data on 2 diff urls, well some of the data but I am going to use the same db for both of them, so I figured the xml file is the way to go. One thing I haven't gotten yet is how to use these settings properly with cfcs. On rays article it shows how to make and initialize the xml file but the part I'm blundering is actually using the settings after that. SO once you have the settings in variables how do you best invoke the cfc with them and then use the variables in the cfc. The only examples I have seen of this is in rays forum app and I dont quite get it. The main thing is to get the db un and password in the cfcs without manually doing each one, I haven't seen anything written on this yet. as usual, I'm sure I make no sense at all ;) ~Dave the disruptor~ "Some people just don't appreciate how difficult it is to dispense wisdom and abuse at the same time." ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218566 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

