Arrayappend returns a true on successful completion. You have to use something like this
<cfset arrayappend( session.cart, structnew() )> Qasim On 6/7/05, Phillip Perry <[EMAIL PROTECTED]> wrote: > I've been trying that, among other things but i keep getting basically the > same error. if it isnt an error for line 1 its an error for line 2. if i do > the (1) on the array it gives me the java.string error for structNew() but > it also says parameter takes 1 parameter. When I put structNew(1) it gives > me paramater takes 0 parameters as an error. with or without #'s. I'm > really confused on this one. > > Phil > > -----Original Message----- > From: Charlie Griefer [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 07, 2005 3:52 PM > To: CF-Talk > Subject: Re: My attempt at a shopping cart > > > gah. > > sorry, arrayNew() takes one argument (the dimension of the array). > assuming a 1d array: > > <cfparam name="session.cart" default="#arrayNew(1)#"> :| > > On 6/7/05, Phillip Perry <[EMAIL PROTECTED]> wrote: > > I tried that but it gives me a validation error function takes 1 parameter > > error. > > > > Phil > > -----Original Message----- > > From: Charlie Griefer [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, June 07, 2005 3:29 PM > > To: CF-Talk > > Subject: Re: My attempt at a shopping cart > > > > > > <cfparam name="session.cart" default="#arrayNew()#"> > > > > poundage makes it an array. lack of poundage makes it a string. > > > > On 6/7/05, Phillip Perry <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > just 2 lines of code and i'm already hitting a wall. I'm using the > > following > > > lines > > > > > > <cfparam name="session.cart" default="arrayNew()"> > > > <cfset session.cart = arrayAppend(session.cart, structnew())> > > > > > > and getting the error code: > > > > > > Object of type class java.lang.String cannot be used as an array > > > > > > What am i doing wrong? > > > > > > Thanks, > > > > > > Phil > > > > > > > > > > > > > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208884 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54