P
Patrick McGuire
I am instantiating several custom objects from a subset
of data contained in an XML file. I then might edit
these objects and save the changes back to the XML file.
However, I want to compare the original state of the
objects with the current object data stored in the XML
file to alert the user to any changes that were made by
other users during the time that the user was making his
own edits.
So I'm doing this:
objEdit= createobject(xmldata)
objOriginal= createobject(xmldata)
DATA EDITING (of objEdit)
..
..
..
objCurrent = createobject(xmldata)
if not objCurrent.Equals(objOriginal) then
msgbox "Another user made changes..."
..
..
..
else
savedata(objEdit)
end if
Two questions:
1) Is this the best approach?
2) For some reason the edits affect objOriginal as well
as objEdit. Why is that happening?
Thanks.
Pat
of data contained in an XML file. I then might edit
these objects and save the changes back to the XML file.
However, I want to compare the original state of the
objects with the current object data stored in the XML
file to alert the user to any changes that were made by
other users during the time that the user was making his
own edits.
So I'm doing this:
objEdit= createobject(xmldata)
objOriginal= createobject(xmldata)
DATA EDITING (of objEdit)
..
..
..
objCurrent = createobject(xmldata)
if not objCurrent.Equals(objOriginal) then
msgbox "Another user made changes..."
..
..
..
else
savedata(objEdit)
end if
Two questions:
1) Is this the best approach?
2) For some reason the edits affect objOriginal as well
as objEdit. Why is that happening?
Thanks.
Pat