Ah, can you use a query as the argumentcollection? Maybe it's just structures.
Adrian -----Original Message----- From: Joelle Tegwen [mailto:[EMAIL PROTECTED] Sent: 20 April 2006 22:23 To: CF-Newbie Subject: Re: cfinvoke problem Well, it's an ldap request, but yes, those are keys within the ldap query return... case sensitive and all Joelle Adrian Lynch wrote: > Does your structure test contain uid and displayName as keys? > > Adrian > > -----Original Message----- > From: Joelle Tegwen [mailto:[EMAIL PROTECTED] > Sent: 20 April 2006 20:43 > To: CF-Newbie > Subject: cfinvoke problem > > > I get this error: > > Entity has incorrect type for being called as a function. > The symbol you have provided init is not the name of a function. > > The error occurred in C:\Projects\timeTracking\test1.cfm: line 17 > > 15 : <!---Create a new User instance and put the information in > there ---> > 16 : <cfobject name="myUser" component="components.user" /> > 17 : <cfinvoke method="init" argumentcollection="#test#" > returnvariable="results"> > 18 : <cfoutput >isStruct(myUser)</cfoutput> > > I've looked online for the error and they say the problem is with > variable scoping, that one has a variable with the same name as a > function call, but I don't see that. > > Am I missing something or is something else going on here? > Thanks in advance > Joelle > > Context: > <cfldap action="QUERY" attributes="*" name="test" > scope="SUBTREE" start="o=University of Minnesota, c=US" > filter="(&(cn =*tegwe002*))" server="ldap.umn.edu" > port="389"> > <cfdump var="#test#"> > > <!---Create a new User instance and put the information in there > ---> > <cfobject name="myUser" component="componants.user" /> > <cfinvoke method="init" argumentcollection="#test#" > returnvariable="results"> > <cfoutput >isStruct(myUser)</cfoutput> > > > > Components.user.cfm > <cfcomponent displayname="contains relevent data for a user including > projects and time allocations" > name="user" output="false" > > <!--- This componant holds all information for a user. It can be > populated with setUserAction. ---> > > <!--- Author: tegwe002 - Date: 4/19/2006 ---> > <cffunction name="init" returntype="boolean" hint="Initializes > componant"> > <cfargument name="uid" required="true" type="String" > hint="user's ID number"/> > <cfargument name="displayName" required="true" type="String" > hint="user's name"/> > <cfset userID=#uid# /> > <cfset userName=#displayName#/> > <cfreturn true> > </cffunction> > > <!--- Author: tegwe002 - Date: 4/5/2006 ---> > <!--- getter for userID ---> > <cffunction name="getUserID" access="public" output="false" > returntype="string"> > <cfreturn variables.my.userID/> > </cffunction> > > <!--- Author: tegwe002 - Date: 4/19/2006 ---> > <!--- getter for displayName ---> > <cffunction name="getdisplayName" access="public" output="false" > returntype="string"> > <cfreturn variables.my.userName/> > </cffunction> > > > </cfcomponent> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1775 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
