I know!!  I need an actual copy!!  :-)

On 2014-06-25 19:47, Fred Taylor wrote:
However you've created your this.oRecord would have to be done again on
whatever object you want to keep your original value in . Setting another
variable to the object is really only an increased count of the object
reference, not an actual copy.

Fred


On Wed, Jun 25, 2014 at 4:37 PM, <
[email protected]> wrote:

(VFP9SP2)

I've got code that's something like this:

loRec = this.oRecord
do form MyForm name loFrm noshow
loFrm.oRecord = this.oRecord
loFrm.Show()
* user makes some changes to loFrm.oRecord, but user presses Cancel button
so I want to revert those changes
if loFrm.lSaved then
  * do some requerying as data was saved via loFrm
else && and this is the scenario where I'm asking for tips
* the changes made in loFrm.oRecord have stayed changed in this.oRecord. I want separation of the two so when the user reverts, this.oRecord is NOT
affected
endif


Ideas? I did something many years ago where I separated objects but can't
recall that voodoo at present.

Thanks,
--Mike


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to