View Full Version : Create secound instance of object after destroy first one does not work

24 Jul 2014, 11:31 PM
Hey together,

I create an instance of an object.

After using destroy or close I can't create an secound Object of it.
I can do so if I only hide the first one.

I tried

var oReport = Ext.create('Xx.report.view.report.Main', {
menuParams: params

and also

var oReport = {
menuParams: menuParams

If I sad I can do as may Instances as I want untill I destroy one of it.

May somebody has a clue what the Problem can be?
I'm sorry I can't give you more code than that because i use to many different files with to much dynamic code.

25 Jul 2014, 10:41 AM
This problem is almost always caused by storing instances on the prototype. If you use configs in your class definitions instead everything should work fine.


If it's not that, my second guess would be duplicate ids.

29 Jul 2014, 10:06 PM

thanks your link didn't solved my Problem but it did solve another one.

I solved it like this: I did not destroy the object itsolve but its parent.
This works but don't ask me why.

Thanks for your help!