I cheat a little bit in some instances... <cfargument name="datasource" type="string" required="no" default="#application.datasources.falcon#">
Stace ________________________________________ From: John Farrar [mailto:[EMAIL PROTECTED] Sent: September 16, 2003 11:26 AM To: [EMAIL PROTECTED] Subject: Re: [CFCDev] application.cfm and cfc's You can try using an "application" scoped variable... but community opinion (which is always right ... correct, so we jump to another community if to become right... anyway) community opinion is that encasulation would keep a CFC ignorant about it's environment. It only knows what you tell it. So, you should pass the information into the cfc... or tell the cfc where to look the information up at least. (like in an include file.) � The only time this becomes an issue is with Web Services or Flash Remoting. Then you are calling the CFCs externally, and then you may want to use the Application.cfm file for declaration, but the include file leans more towards the concept of encapsulation. (Also, if you are on linux... don't know if this is still an issue, but the Application.cfm required a capital 'A' according to older docs. Don't have a linux server running CF... can't tell you. That could cause someone to not get the Application.cfm file to be called though, if it wasn't case correct.) � John Farrar ----- Original Message ----- From: Tony Weeg To: [EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 11:12 AM Subject: [CFCDev] application.cfm and cfc's yah! i understand. � now, does the Application.cfm file get processed before cfc's get processed. � i have application.cfm with my site wide dsn's established in there. i reference said dsn variable, and its spitting up, saying its not defined? � weird. tony weeg sr. web applications architect navtrak, inc. [EMAIL PROTECTED] www.navtrak.net office 410.548.2337 fax 410.860.2337 AVIS IMPORTANT: ------------------------------- Les informations contenues dans le present document et ses pieces jointes sont strictement confidentielles et reservees a l'usage de la (des) personne(s) a qui il est adresse. Si vous n'etes pas le destinataire, soyez avise que toute divulgation, distribution, copie, ou autre utilisation de ces informations est strictement prohibee. Si vous avez recu ce document par erreur, veuillez s'il vous plait communiquer immediatement avec l'expediteur et detruire ce document sans en faire de copie sous quelque forme. WARNING: ------------------------------- The information contained in this document and attachments is confidential and intended only for the person(s) named above. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution, or any other use of the information is strictly prohibited. If you have received this document by mistake, please notify the sender immediately and destroy this document and attachments without making any copy of any kind. ---------------------------------------------------------- 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). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
