Greetings,

Possibly. I'm not up on the ORM shtuff like I should be. Going to have to
remedy that sometime soon.

On Thu, Jun 28, 2012 at 3:00 PM, Mark Davis <[email protected]> wrote:

> Just making a wild stab in the dark, but could those possibly be reserved
> words associated with ORM?
>
>
> On Thu, Jun 28, 2012 at 1:03 PM, jhusum <[email protected]> wrote:
>
>> Greetings,
>>
>> I had the initialization and function calls on a separate CFM page. So,
>> something like this:
>>
>> myPage.cfm
>>
>> <cfset myObject = createObject("component","myComponent").init(arguments)
>> />
>> <cfset myVar = myObject.callingfunction() />
>>
>> Then the CFC had the code I listed before. Nothing out of the ordinary.
>> Again, I've used similar calls within other CFCs in the system and had no
>> problem.
>>
>> One other thing that I noticed while I was debugging the problem was when
>> I had the function named insertRow, It would run once just fine but any
>> subsequent tries would throw the error at me that the variable insertRow is
>> undefined.
>>
>> Its all working now that I changed the function names. Again, I'm
>> assuming there is something in the internals of the CF engine that it was
>> having problems with.
>>
>> On Thursday, June 28, 2012 8:29:38 AM UTC-5, Ajas Mohammed wrote:
>>>
>>> Glad you got it resolved. Quick question, how were you calling this CFC?
>>> was it being called from a cfm page?
>>>
>>> As per your email, there was this code
>>>
>>> <cffunction name="callingFunction">
>>>         <cfargument name="formInfo" />
>>>
>>> Let us know 1)how you were initiating the CFC i.e. cfobject or
>>> createobject or cfinvoke and 2) how you were calling this callingFunction?
>>>
>>> p.s this is one of those cases where in only actual code can tell what
>>> is going on, any pseudo code is just a pointer. But Iunderstand, there are
>>> rules and issues with sharing some code.
>>>
>>> Thanks,
>>>
>>> <Ajas Mohammed />
>>> iUseDropbox(http://db.tt/**63Lvone9 <http://db.tt/63Lvone9>)
>>> http://ajashadi.blogspot.com
>>> We cannot become what we need to be, remaining what we are.
>>> No matter what, find a way. Because thats what winners do.
>>> You can't improve what you don't measure.
>>> Quality is never an accident; it is always the result of high intention,
>>> sincere effort, intelligent direction and skillful execution; it represents
>>> the wise choice of many alternatives.
>>>
>>>
>>>
>>> On Thu, Jun 28, 2012 at 8:59 AM, jhusum  wrote:
>>>
>>>> Greetings,
>>>>
>>>> After trying the various sugestions here (changing access from private
>>>> to public, trying CFscript syntax, etc.) I went ahead and renamed the
>>>> functions. That seems to have solved the issue.
>>>>
>>>> I'm going to guess insertRow and updateRow maybe conflicting with
>>>> something in the internals of the CF engine itself. I still don't know why
>>>> it was giving me the message saying a function name was a variable but it
>>>> is working now.
>>>>
>>>> Thanks for all the suggestions folks.
>>>>
>>>>
>>>> On Wednesday, June 27, 2012 5:38:19 PM UTC-5, Kier Simmons wrote:
>>>>>
>>>>> Might be the use of <CFSET>.   Try something like this.
>>>>>
>>>>> <CFSCRIPT>
>>>>>
>>>>>        if (arguments.formInfo.ID eq 0)
>>>>>            insertRow(field1,**fi**eld2,field3);
>>>>>
>>>>>       else
>>>>>            updateRow(ID,**field1**);
>>>>> </CFSCRIPT>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Kier Simmons
>>>>> Manager of Application Development
>>>>> [image: 
>>>>> http://www.giveblood.org/email/graphics/cfl_logo.gif]<http://www.giveblood.org/>
>>>>>
>>>>> Phone:
>>>>>
>>>>> 713-791-6619
>>>>>
>>>>> Toll Free:
>>>>>
>>>>> 1-888-482-5663
>>>>>
>>>>> Fax:
>>>>>
>>>>> 713-791-6681
>>>>>
>>>>> www.giveblood.org
>>>>>
>>>>>
>>>>> P Please consider the environment before printing this e-mail.
>>>>>
>>>>>
>>>>>
>>>>> *From:* [email protected] 
>>>>> [mailto:houcfug@googlegroups.**c**om<[email protected]>]
>>>>> *On Behalf Of *jhusum
>>>>> *Sent:* Wednesday, June 27, 2012 5:16 PM
>>>>> *To:* [email protected]
>>>>> *Subject:* Re: [houcfug] Function being treated as a variable?
>>>>>
>>>>>
>>>>>
>>>>> Greetings,
>>>>>
>>>>> Regretably I'm not at liberty to send the code. But yes, you are
>>>>> essentially right. I have a CFC that has a function that calls one of the
>>>>> other two functions based on some conditional logic.
>>>>>
>>>>> To pseudo-code it:
>>>>>
>>>>> <cfcomponent name="myComponent">
>>>>>
>>>>>     <cffunction name="callingFunction">
>>>>>         <cfargument name="formInfo" />
>>>>>
>>>>>         <cfif arguments.formInfo.ID eq 0>
>>>>>             <cfset insertRow(field1,field2,**field3**) />
>>>>>         <cfelse>
>>>>>             <cfset updateRow(ID,field1) />
>>>>>         </cfif>
>>>>>     </cffunction>
>>>>>
>>>>>     <cffunction name="insertRow" access="private" returntype="void">
>>>>>         <cfargument name="field1" />
>>>>>        <cfargument name="field2" />
>>>>>        <cfargument name="field3" />
>>>>>
>>>>>         <cfquery name="insertRow" datasource="blah">
>>>>>         INSERT INTO table
>>>>>             (field1,field2,field3)
>>>>>         VALUES
>>>>>             (arguments.field1,arguments.**fi**eld2,arguments.field3)
>>>>>         </cfquery>
>>>>>
>>>>>     < /cffunction>
>>>>>
>>>>>     <cffunction name="updateRow" access="private" returntype="void">
>>>>>         <cfargument name="field1" />
>>>>>        <cfargument name="field2" />
>>>>>        <cfargument name="field3" />
>>>>>
>>>>>         <cfquery name="insertRow" datasource="blah">
>>>>>         UPDATE table
>>>>>         SET field1 = arguments.field1
>>>>>         WHERE ID = arguments.ID
>>>>>         </cfquery>
>>>>>
>>>>>     < /cffunction>
>>>>>
>>>>> </cfcomponent>
>>>>>
>>>>> I have similar helper functions in other CFCs within the same code
>>>>> base using essentially the same syntax to call the helper functions (i.e.,
>>>>> <cfset someFunction(argument) />) They all run fine. It is just this one
>>>>> that is giving me the strange error thatmakes it look like the function is
>>>>> being treated as a variable (i.e., Variable updateRow is undefined.)
>>>>>
>>>>> I've got no clue as to why this message is coming up and so far my
>>>>> Google-fu has not turned up anything.
>>>>>
>>>>> On Wednesday, June 27, 2012 4:54:28 PM UTC-5, Ajas Mohammed wrote:
>>>>>
>>>>> If you dont mind, can email us the full CFC. I am assuming, you have
>>>>> CFC xyz which has these 2 functions and then you call these 2 functions
>>>>> from the same xyz CFC based of logic.
>>>>>
>>>>>
>>>>> <Ajas Mohammed />
>>>>>
>>>>> iUseDropbox(http://db.tt/**63Lvo**ne9 <http://db.tt/63Lvone9>)
>>>>> http://ajashadi.blogspot.com
>>>>> We cannot become what we need to be, remaining what we are.
>>>>> No matter what, find a way. Because thats what winners do.
>>>>> You can't improve what you don't measure.
>>>>> Quality is never an accident; it is always the result of high
>>>>> intention, sincere effort, intelligent direction and skillful execution; 
>>>>> it
>>>>> represents the wise choice of many alternatives.
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Jun 27, 2012 at 5: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 
>>>>> houcfug-unsubscribe@**googlegrou**ps.com<[email protected]>
>>>>> For more options, visit http://groups.google.com/**group**
>>>>> /houcfug?hl=en <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 
>>>>> houcfug-unsubscribe@**googlegrou**ps.com<[email protected]>
>>>>> For more options, visit http://groups.google.com/**group**
>>>>> /houcfug?hl=en <http://groups.google.com/group/houcfug?hl=en>
>>>>>
>>>>>
>>>>> ------------------------------
>>>>> This e-mail message and any files transmitted with it are confidential
>>>>> and intended solely for the use of the individual or entity to which
>>>>> they are addressed. If you are not the intended recipient or an
>>>>> authorized representative of the intended recipient, you are hereby
>>>>> notified
>>>>> that any review, dissemination, or copying of this message and its
>>>>> attachments or the information contained herein is prohibited. If you
>>>>> have
>>>>> received this message in error, please notify the sender by return
>>>>> e-mail and delete this e-mail message from your computer. Thank you.
>>>>>    ­­
>>>>>
>>>>  --
>>>> You received this message because you are subscribed to the "Houston
>>>> ColdFusion Users' Group" discussion list.
>>>> To unsubscribe, send email to 
>>>> houcfug-unsubscribe@**googlegroups.com<[email protected]>
>>>> For more options, visit 
>>>> http://groups.google.com/**group/houcfug?hl=en<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
>>
>
>  --
> 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