This may be a little easier:

<cfset strKeys = structKeyArray(form)>
<cfset myObject = session.SomeReactorObject>

<cfloop collection="#form#" item="i">
<cfif i not contains "submit,formfields" and structKeyExists(myObject,"set"  & i)>
<cfinvoke object="#myObject#" method="set#i#">
<cfinvokearg name="#i#" value="#form[i]#" />
</cfinvoke>

</cfif>

</cfloop>


You might find that works a little better and is slightly more readable.


Laterz,

J


------------------------------------------------

Jared C. Rypka-Hauer

Continuum Media Group LLC

http://www.web-relevant.com

Member, Team Macromedia - ColdFusion


"That which does not kill me makes me stranger." - Yonah Schmeidler


On Mar 8, 2006, at 12:29 PM, João Fernandes wrote:

Sorry guys but I’m starting to get my brain overloaded.

 

I’m trying to fill my record dynamically but setting something like this:

<cfset funct = myRecord[“set#myvar#”]>

<cfset funct(myvalue)>

 

I’m getting this

 

Variable _getTo is undefined.

 

408 :          
409 :                  
410 :                  <cfset _getTo().artigo_id = arguments.artigo_id />  ß-------------- HERE
411 :          

 

 

If I dump my funct before executing  it I get the correct function…same for the _getTo().

 

It’s been a long day, is this reactor related or my brain just stopped ?

 

 

João Fernandes
Sistemas de Informação

Programador Informático
Cofina media

Avenida João Crisóstomo, Nº 72 . 1069-043 Lisboa PORTUGAL
Tel (+351) 213 185 200 . Fax (+351) 213 540 370
[EMAIL PROTECTED]

 

-- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/

Reply via email to