Just assign it?

wxdqz

New Member
Gary <[email protected]> wrote in messagenews:[email protected]...>> I need to create an object using one standard name, but then change thename of the object and preserve that object and then re-use the originalname again for a new object.>> The objects will be instantiated through ActiveXObject automation serverin an JScript/VBscript in ASP. As such the class will have a Java COM dllwrapper.>I'm not sure why you're hung up on the "name" of the object. Let's see if Iunderstand what you mean here. First you want to doMyObject standardName = new MyObject();where MyObject is the Java class wrapping your ActiveX object. Then youwant to preserve that object, but under a different name. The way to dothat is simplyMyObject differentName = standardName;At this point both standardName and differentName refer to your object. Nocopying or cloning is required. Now you want to create a new object usingthe original name:MyObject standardName = new MyObject();After this, differentName refers to the first object and standardName refersto the new object. Have I got it right?
 
Back
Top