I have a function with some methods.
function acpwindow(){
this.gui=function(){
//some stuff
}
this.update=function(){
//some stuff
}
}
Now i would like to create multiple instances of that function.
i have a button that create windows. onclick new window will trigger;
function createwindow(){
var object1= new acpwindow();
/*
**Here is a problem I have, How to maintain the objects unique.**
*/
}
When user makes some actions on windows gui those requests sent to server and then server will respond for those request.
Now my other issue is how to how to update particular window according to the response.
The only hope i have is I will generate a unique UUID for each request and the same will return in the response.
I think if you create some kind of window manager to manage the windows you create, it might be easier to send and process requests. Something like:
http://jsfiddle.net/v3T94/1/
And in the example, if it’s necessary, you can use the
idproperty. Otherwise, if you keep track of the reference when callingsendRequest, you should be able to perform what you want on the correctacpwindow