RE: [flexcoders] Flex 1.5 - getrepeaterItem values

2006-04-23 Thread Matt Chotin
Title: Message










Youll need to make your own copy of
the object, AS is always pass by reference.



You can try calling
mx.utils.ObjectCopy.copy(yourobj) and it may give you back a copy with what you
want.



Matt











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Griffin
Sent: Saturday, April 22, 2006
3:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 1.5 -
getrepeaterItem values







I havea small app which passes the
reference to a repeater item to an editable view. I have been trying to
assign the values from the original repeater dataProvider item into a
newarray that can then be edited without affecting the original data
until explicitly saved. The problem is that every combination I've tried
is still updating the repeater data so I'm pretty sure I'm just assigning
references instead of copying the values over. A simplified version of
the code follows:







//positionVO has an array of names called
Successors





var editablePosition:positionVO;











//currentPosition is the repeater item
that got clicked in the main UI 





function
setEditableDetails(currentPosition)
{

 editablePosition.Successors =
currentPosition.getRepeaterItem().Successors;






 //also tried creating
editablePosition variable as a new positionVO





 //editSuccessorsList
should now be able to have items added to it without adding them to the
original currentPosition data as well





 //with this code the
repeater view is still bound to editSuccessorList's dataProvider newitems
are added to both lists





 






editSuccessorsList.dataProvider = editablePosition.Successors;






 }







If anyone can advise on what I'm doing
wrong in theprevious example a nudge in the right direction would be
appreciated. 











Many thanks in advance.











Mike











--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.4/320 - Release Date: 4/20/2006
 

Re: [flexcoders] Flex 1.5 - getrepeaterItem values

2006-04-23 Thread Stanislav Zayarsky



Matt, you know that mx.utils.ObjectCopy doesn't work properly.

Best regards
Stanislav

On 4/23/06, Matt Chotin [EMAIL PROTECTED] wrote:



 You'll need to make your own copy of the object, AS is always pass by
 reference.



 You can try calling mx.utils.ObjectCopy.copy(yourobj) and it may give you
 back a copy with what you want.



 Matt


 


 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Michael Griffin
 Sent: Saturday, April 22, 2006 3:50 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex 1.5 - getrepeaterItem values





 I have a small app which passes the reference to a repeater item to an
 editable view. I have been trying to assign the values from the original
 repeater dataProvider item into a new array that can then be edited without
 affecting the original data until explicitly saved. The problem is that
 every combination I've tried is still updating the repeater data so I'm
 pretty sure I'm just assigning references instead of copying the values
 over. A simplified version of the code follows:


 //positionVO has an array of names called Successors


 var editablePosition:positionVO;





 //currentPosition is the repeater item that got clicked in the main UI


 function setEditableDetails(currentPosition)
 {

 editablePosition.Successors =
 currentPosition.getRepeaterItem().Successors;



 //also tried creating editablePosition variable as a new positionVO


 //editSuccessorsList should now be able to have items added to it
 without adding them to the original currentPosition data as well


 //with this code the repeater view is still bound to editSuccessorList's
 dataProvider new items are added to both lists





 editSuccessorsList.dataProvider = editablePosition.Successors;



 }


 If anyone can advise on what I'm doing wrong in the previous example a nudge
 in the right direction would be appreciated.





 Many thanks in advance.





 Mike




 --
 Flexcoders Mailing List
 FAQ:
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com


 
 YAHOO! GROUPS LINKS

 Visit your group flexcoders on the web.

 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 



 --
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.1.385 / Virus Database: 268.4.4/320 - Release Date: 4/20/2006
 
 YAHOO! GROUPS LINKS

 Visit your group flexcoders on the web.

 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 



 --
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.1.385 / Virus Database: 268.4.4/320 - Release Date: 4/20/2006









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Flex 1.5 - getrepeaterItem values

2006-04-23 Thread Matt Chotin



It's been a while since I thought about it, someone might have posted
bug fixes to it or have their own version. Larger point is he'll need
to do a copy :-)

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Stanislav Zayarsky
Sent: Sunday, April 23, 2006 3:39 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex 1.5 - getrepeaterItem values

Matt, you know that mx.utils.ObjectCopy doesn't work properly.

Best regards
Stanislav

On 4/23/06, Matt Chotin [EMAIL PROTECTED] wrote:



 You'll need to make your own copy of the object, AS is always pass by
 reference.



 You can try calling mx.utils.ObjectCopy.copy(yourobj) and it may give
you
 back a copy with what you want.



 Matt


 


 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Michael Griffin
 Sent: Saturday, April 22, 2006 3:50 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex 1.5 - getrepeaterItem values





 I have a small app which passes the reference to a repeater item to an
 editable view. I have been trying to assign the values from the
original
 repeater dataProvider item into a new array that can then be edited
without
 affecting the original data until explicitly saved. The problem is
that
 every combination I've tried is still updating the repeater data so
I'm
 pretty sure I'm just assigning references instead of copying the
values
 over. A simplified version of the code follows:


 //positionVO has an array of names called Successors


 var editablePosition:positionVO;





 //currentPosition is the repeater item that got clicked in the main UI


 function setEditableDetails(currentPosition)
 {

 editablePosition.Successors =
 currentPosition.getRepeaterItem().Successors;



 //also tried creating editablePosition variable as a new
positionVO


 //editSuccessorsList should now be able to have items added to it
 without adding them to the original currentPosition data as well


 //with this code the repeater view is still bound to
editSuccessorList's
 dataProvider new items are added to both lists





 editSuccessorsList.dataProvider = editablePosition.Successors;



 }


 If anyone can advise on what I'm doing wrong in the previous example a
nudge
 in the right direction would be appreciated.





 Many thanks in advance.





 Mike




 --
 Flexcoders Mailing List
 FAQ:
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com


 
 YAHOO! GROUPS LINKS

 Visit your group flexcoders on the web.

 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 



 --
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.1.385 / Virus Database: 268.4.4/320 - Release Date:
4/20/2006
 
 YAHOO! GROUPS LINKS

 Visit your group flexcoders on the web.

 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 



 --
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.1.385 / Virus Database: 268.4.4/320 - Release Date:
4/20/2006





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Flex 1.5 - getrepeaterItem values

2006-04-23 Thread Michael Griffin
Title: Message





Thanks 
MattI thought that was the case. 

I had 
tried ObjectCopy, but couldn't get it to work. A few hours after I posted 
the cry for help I refound Darron's object copy script on his blog which did the 
trick. Just in case anyone else hits their head on the same problem here's 
the link again for reference: http://www.darronschall.com/weblog/archives/000148.cfm

Thanks 
again.

Mike

  
  -Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
  Matt ChotinSent: Sunday, April 23, 2006 3:06 AMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Flex 1.5 - 
  getrepeaterItem values
  
  You’ll need to make 
  your own copy of the object, AS is always pass by 
  reference.
  
  You can try calling 
  mx.utils.ObjectCopy.copy(yourobj) and it may give you back a copy with what 
  you want.
  
  Matt
  
  
  
  
  
  From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael GriffinSent: Saturday, April 22, 2006 3:50 
  PMTo: 
  flexcoders@yahoogroups.comSubject: [flexcoders] Flex 1.5 - 
  getrepeaterItem values
  
  
  I havea small 
  app which passes the reference to a repeater item to an editable view. I 
  have been trying to assign the values from the original repeater dataProvider 
  item into a newarray that can then be edited without affecting the 
  original data until explicitly saved. The problem is that every 
  combination I've tried is still updating the repeater data so I'm pretty sure 
  I'm just assigning references instead of copying the values over. A 
  simplified version of the code follows:
  

//positionVO has an 
array of names called Successors

var 
editablePosition:positionVO;



//currentPosition 
is the repeater item that got clicked in the main UI 


function 
setEditableDetails(currentPosition){ 
editablePosition.Successors = 
currentPosition.getRepeaterItem().Successors;

 
//also tried creating editablePosition variable as a new 
positionVO

 
//editSuccessorsList should now be able to have items added to it without 
adding them to the original currentPosition data as 
well

 //with this code 
the repeater view is still bound to editSuccessorList's dataProvider 
newitems are added to both lists

 


 
editSuccessorsList.dataProvider = 
editablePosition.Successors;

 
}
  
  If anyone can advise 
  on what I'm doing wrong in theprevious example a nudge in the right 
  direction would be appreciated. 
  
  
  
  Many thanks in 
  advance.
  
  
  
  Mike
  
  --No virus found in this outgoing message.Checked by 
  AVG Free Edition.Version: 7.1.385 / Virus Database: 268.4.4/320 - Release 
  Date: 4/20/2006
  --No virus found in this incoming message.Checked by 
  AVG Free Edition.Version: 7.1.385 / Virus Database: 268.4.4/320 - Release 
  Date: 4/20/2006





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.4/320 - Release Date: 4/20/2006
 


[flexcoders] Flex 1.5 - getrepeaterItem values

2006-04-22 Thread Michael Griffin
Title: Message





I 
havea small app which passes the reference to a repeater item to an 
editable view. I have been trying to assign the values from the original 
repeater dataProvider item into a newarray that can then be edited without 
affecting the original data until explicitly saved. The problem is that 
every combination I've tried is still updating the repeater data so I'm pretty 
sure I'm just assigning references instead of copying the values over. A 
simplified version of the code follows:

  //positionVO has an array of names called 
Successors
  var 
  editablePosition:positionVO;
  
  //currentPosition is the repeater item that got clicked in the main UI 
  
  function 
  setEditableDetails(currentPosition){ 
  editablePosition.Successors = 
  currentPosition.getRepeaterItem().Successors;
   //also tried creating editablePosition variable as a 
  new positionVO
   //editSuccessorsList should now be able to have 
  items added to it without adding them to the original currentPosition data as 
  well
   //with this code the repeater view is still bound to 
  editSuccessorList's dataProvider newitems are added to both 
  lists
   
   editSuccessorsList.dataProvider = 
  editablePosition.Successors;
   }
If anyone can advise on what I'm doing wrong in theprevious example 
a nudge in the right direction would be appreciated. 

Many thanks in advance.

Mike





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.4/320 - Release Date: 4/20/2006