Not to Hijack but I always do this

// instantiate Image CFC
imgObject = CreateObject("component", "model.image").init(dsn);

 <cffunction name="init" returntype="user" access="public" output="false">
  <cfargument name="dsn" type="string" required="yes" />
  <cfset variables.dsn = arguments.dsn />
  <cfreturn this />
 </cffunction>

Passing the dsn to the CFC in the create object?? Is this correct or should
I change my ways?

Always looking to better my skill

Eric



On 2/21/07, Dwayne Cole <[EMAIL PROTECTED]> wrote:
>
> what about request scoped variables? Are they available inside components?
>
>
> ---------- Original Message ----------------------------------
> From: JediHomer <[EMAIL PROTECTED]>
> Reply-To: [email protected]
> Date:  Wed, 21 Feb 2007 15:13:28 +0000
>
> >
> >Yes they are available, however they do need to be in the Application
> >scope, the initial post was just creating global variables which are
> >not available to the CFC rather than Application variables.  Similarly
> >as someone has pointed out, the use of the variable was not surrounded
> >with hashes so the literal word datasource was being used rather than
> >the value of datasource
> >
> >
> >HTH
> >
> >
> >
> >On 21/02/07, Dwayne Cole <[EMAIL PROTECTED]> wrote:
> >> The artcile still does not address what I think is the root of the
> question though.
> >>
> >> Are application variables availble inside a component (cfc) initiated
> within that application root?
> >>
> >>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270319
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to