On 2 May 2006, at 23:01, Norman Palardy wrote:

This simply makes a new array that has a new bunch of references to the same instances.

You'd need something like

        redim MyCancelArray(-1)
        
        for each MC as MyClass in MyActualArray
MyCancelArray.Append new myClass(MC) /// this assumes you have a COPY CONSTRUCTOR that makes a new myClass from an existing one
        next

Ah yes, of course! The penny has dropped, as we say in the UK. Thank you Norman. I will recode immediately! :)

Basically myClass would need to have a constructor that looks like

        Constructor(existingInstance as myClass)
        
                me.property = existingInstance.property

                // and so on for ALL other properties in myClass

This literally makes a copy

Yup, gotcha.

Personally I tend to like the ability to have an object keep track of the changes and then I can just keep one set of objects and ask each one if it had any changes made. This makes for fewer objects and copies and also makes it easy to figure out if anything changed.

Yes, I see what you mean, however in this instance a simple "revert" will suffice for my needs.

Thanks again.

I LOVE this list! :) Probably one of the best things about RB.

All the best,

Mark.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to