Another nice one is: QuerySetRow(Query=Users,Name='Foo',Password='Bar',Date=now(),RowNumber=2);
To replace: querySetCell(Users,'Name','Foo',2); querySetCell(Users,'Password','Bar',2); querySetCell(Users,'Date',now(),2); Baz -----Original Message----- From: Brendan Baldwin [mailto:[EMAIL PROTECTED] Sent: January 4, 2006 6:12 PM To: CF-Talk Subject: Re: Smallest, coolest function I ever wrote: Struct() You know, what I'd REALLY like is for CFScript to adopt the JavaScript convention of allowing the creation of Structs like: person = {id=1,name="Brendan",occupation="Thumb-Twiddler"}; Of course, they could throw in an Array constructor too: people = ["Brendan","Ray","Andy"]; I can dream... or switch to Ruby ;-) ? Come on Macromedia!!! Make my dreams come true!!! --Brendan http://www.brendanbaldwin.com On 1/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > That's a nice function Brendan. Good job. > > andy > > Here's the actual function in cfscript: > > > > function Struct() { return arguments; } > > > > I posted about its use here: > > http://www.brendanbaldwin.com/post/structfunction/ > > > > Basically though, it lets you do this: > > > > customer=Struct(id=1,name="Brendan",occupation="Web-Lackey"); > > > > Which does the equivalent of: > > > > customer=StructNew(); > > StructInsert(customer,"id",1); > > StructInsert(customer,"name","Brendan"); > > StructInsert(customer,"occupation","Web-Lackey"); > > > > Pass it on! :-) > > > > --Brendan Baldwin > > http://www.brendanbaldwin.com > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228414 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

