|
Mailing Lists
|
Home /
Groups /
Adobe Flex
Copy a RecordSet in Actionscript
Hi all,Steve Durette 07/20/10 11:38 A ObjectUtil in flex has clone() and copy() methods, maybe it could help :Palleas 07/20/10 11:44 A Actually I'm using FlashForms, but most of the ActionScript was writtenDURETTE, STEVEN J (ATTASIAIT) 07/20/10 11:59 A > Tried the ObjectUtil, but it didn't work.Dave Watts 07/20/10 12:21 P No error, but the page didn't render. I commented out the code and theDURETTE, STEVEN J (ATTASIAIT) 07/20/10 12:42 P > No error, but the page didn't render. I commented out the code and theDave Watts 07/20/10 12:54 P Hi all, I have code that does flash remoting and gets back a query. What I need to be able to do is make a copy of the resulting RecordSet. The reason is that I have 2 dataGrids on my form, one is supposed to be editable, and one is supposed to show the "untainted" original data. If I put the same data source for both dataGrids, then changes made in one reflect in the other. Thanks, Steve ObjectUtil in flex has clone() and copy() methods, maybe it could help : http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/utils/ObjectUtil.html?allClasses=1 You have plenty of other solutions but I think this one is the easiest as you are already using flex. ----- Excess quoted text cut - see Original Post for more ----- Actually I'm using FlashForms, but most of the ActionScript was written using Flex books as a guide. Tried the ObjectUtil, but it didn't work. Sorry, for a short while I was doing nothing but learning/using ActionScript for a project, then I've been off of it for more than 2 years. Now I'm trying to get back into it to fix a problem. Thanks, Steve ObjectUtil in flex has clone() and copy() methods, maybe it could help : http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/ut ils/ObjectUtil.html?allClasses=1 You have plenty of other solutions but I think this one is the easiest as you are already using flex. > > Hi all, > > I have code that does flash remoting and gets back a query. What I need to > be able to do is make a copy of the resulting RecordSet. > > The reason is that I have 2 dataGrids on my form, one is supposed to be > editable, and one is supposed to show the "untainted" original data. If I ----- Excess quoted text cut - see Original Post for more ----- > Tried the ObjectUtil, but it didn't work. Can you provide more detail about what didn't work? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. No error, but the page didn't render. I commented out the code and the page worked again. I found a work around though, it isn't optimal, but it works. I changed the cfc that returned the data to return a struct. In that struct is the original query and a duplicate. <cfset resultset.origQuery = myQuery /> <cfset resultset.backupQuery = myQuery /> When I cfreturn resultset, both items are available to the Actionscript and I can make changes to one without effecting the other. It works for now. After I solve the user issue I will go back and see alternate ways of doing this (and if I'm just doing stuff wrong) Thanks for all the help. Steve > Tried the ObjectUtil, but it didn't work. Can you provide more detail about what didn't work? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. > No error, but the page didn't render. I commented out the code and the > page worked again. OK, I see why - you're using Flash forms, not Flex 2+. That's an ActionScript 3 thing. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite
|
May 21, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||