>This bug is killing me.  I have a collection class for my companies plants. 
>  It creates a structure, the key of which is the plant number, and the 
>value is the plant object for that particular plant.  One of the methods is 
>getPlantByNumber('01'), and it works fine- you pass the plant number in as 
>an argument, and it returns the plant object for that number.  I'd like to 
>create another method, though, to return the entire collection, so you can 
>loop through it on your own instead of having to call the getPlantByNumber 
>over and over again (cfc method calls are expensive if you have hundreds of 
>'em).  I can't do it.  If I return the structure, I return a reference and 
>the program I return it to can damage it.  If I return a duplicate() of the 
>structure, I encounter the bug.  Either way, I'm hosed.


Why can't you just use the StructCopy() function to get a copy by value of 
the structure? That should do what you need.

Regards,
Dave.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Get the mailserver that powers this list at http://www.coolfusion.com

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

Reply via email to