[Gambas-user] Trying to copy a collection with problems
richard terry
rterry at ...1822...
Sun Mar 30 08:49:37 CEST 2008
I'm working on the past history in my program.
I've a collection of these for aperson
ie person.pasthistory = the collection. I can add to this, iterate through it
etc, no problem.
I want to copy this to keep a 'backup copy' to later check if any of the
original data has been changed, and have tried this
In my frmPastHistory I have this:
Public PH_Copy As cPastHistory
When the form loads I use the data from the calling form (frmClinical) and do
this:
public sub form_open()
PH_Copy = New Collection
H_Copy = frmClinical.currentPatient.past_history
Now what happens is if I change anything in
frmClinical.currentPatient.past_history collection after that - it
automatically changes in the Backup collection, so it seems that I'm just
pointing to a memory address somehow, not creating an independant collection.
Any help appreciated. Hope this makes sense.
Regards
Richard.
More information about the User
mailing list