Get a new variable

  • Thread starter Thread starter oLiVieR
  • Start date Start date
O

oLiVieR

Hello,

I have an object that is WebBrowerClass and represent the document loaded
in IE.

I want to modify the object wihout affecting the display in IE.

Basically, i want to save the HTML source to a file modifying the links to
make them relative.

But now, when i do that, the document in IE get changed. How can i get a
separate object that is not linked to IE but conatins the document.


Thanks
Olivier
 
Hi ,

The Reason for this is -- You are using a reference type , this happens
because :

<WebBrowserClass> obj1 -- Containing your original IE document .

<WebBrowserClass> obj2 = obj1 -- this is the new object that you want to
make a change in and this is how you fill it .

But internally what happens is being a reference variable , both of
them point to same memory location , so if you change data in one it
will invariably get reflected in other , string class is only exception
to this rule .

You can solve it by creating obj2 object and filling it as you did for
obj1 , then in that case both won't have any relation and will point to
different mem. locations and you make changes and do whatever you want
to one irrespective of other .

regards ,

Mrinal
 
Back
Top