Greetings,

Good to know. I'll add that to my knowledge base of debugging tips.

Thanks.

On Fri, Jun 29, 2012 at 11:11 PM, Billy Cravens <[email protected]> wrote:

> James,
>
> CFC's are structures; you can reference the function inside of the CFC
> from the "this" scope:
>
> this.InsertRow(...)
>
> http://www.billycravens.com/overriding-coldfusion-function-in-a-cfc
>
> This also allows for fun things like dynamically calling functions:
>
> reportData = this['report_#reportName#'](formData);
>
> Billy Cravens
> [email protected]
>
>
>
> On Jun 27, 2012, at 4:38 PM, jhusum wrote:
>
> Greetings,
>
> OK, another strange one...
>
> I've got two helper functions within a CFC to insert or update a record
> into the database. Based on a conditional one of the functions is run. I'm
> calling the functions from within the CFC as such:
>
> <cfif ID eq 0>
>      <cfset insertRow(field1,field2,field3) />
> <cfelse>
>      <cfset updateRow(ID,field1) />
>  </cfif>
>
> However when I'm running the code CF is giving me the message: Variable
> insertRow is undefined.
>
> I've tried this as well:
>
> <cfif ID eq 0>
>      <cfset temp = insertRow(field1,field2,field3) />
> <cfelse>
>      <cfset temp = updateRow(ID,field1) />
>  </cfif>
>
> and I'm still getting the same message.
>
> I'm doing similar function calls in other CFCs with the first syntax above
> and everything works like a charm.
>
> Anyone got any ideas on why CF would be thinking this on is a variable
> instead of a function?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the "Houston
> ColdFusion Users' Group" discussion list.
> To unsubscribe, send email to [email protected]
> For more options, visit http://groups.google.com/group/houcfug?hl=en
>
>
>  --
> You received this message because you are subscribed to the "Houston
> ColdFusion Users' Group" discussion list.
> To unsubscribe, send email to [email protected]
> For more options, visit http://groups.google.com/group/houcfug?hl=en
>



-- 
James Husum
The Quixote Project - one guy's quest to make the world a better place -
http://www.thequixoteproject.org/
Brainsludge - all the shtuff running around my brain -
http://www.brainsludge.com/
Currently reading: The Chessmen of Mars by Edgar Rice Burroughs

-- 
You received this message because you are subscribed to the "Houston ColdFusion 
Users' Group" discussion list.
To unsubscribe, send email to [email protected]
For more options, visit http://groups.google.com/group/houcfug?hl=en

Reply via email to