> > <cfset person1=structnew()>
> > <cfset person2=person1>
> > <cfset person2.name="ken">
> >
> > <cfoutput>#person1.name#</cfoutput>
> >
> > this would yield "ken" in cf5, but in cfmx, you get 
> > an error on line 2 saying "Complex object types cannot
> > be converted to simple values."
> >
> > so are there no pointers in cfmx?? any other way i'm not 
> > aware of to cut down on long complex object references?
> 
> This doesn't have do to with pointers. In CFMX, any variables 
> with a "." in it are automatically converted into structures. 
> So, in your example, person2.name is now a structure with a 
> key of name and a value of "ken", not a simple value. Hence 
> your error.

No, actually, Ken's original error was one of testing, as I think he's since
discovered.

In the case of the above code, person2 is a structure because it was created
using person1. The value of the "name" key in person2 (or person1 for that
matter) is a simple value, so you can safely output person1.name.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to