View Full Version : Avoid duplicate content by using xtypes or variables from other files

18 Aug 2011, 2:12 AM
Hi all,

I am building a program in wich i have several panels. In each panel i want to use at some point the same content using xtypes for exemple or simply variables from other files. The issue i am experiencing is when i first trigger an action that calls one object on one panel, it works, but when i change panel i am having layout issues. Can someone tell me how to prevent that?

Thank you!

18 Aug 2011, 5:23 AM
Any idea, please???

19 Aug 2011, 2:20 AM
I use a globals.js file to store some global variables.

Regarding your components, you can use Ext.reg to register your views so you can use the registered xtype in your other components.

From your description, I really can't tell where your layout problems are coming from

19 Aug 2011, 4:18 AM
I've tried this way but when i call the variable in one panel (the first one), everything is fine, but in another panel it seems not to exists. But also, when i only call it in the second panel it seems to work fine. Is there an option or a method to say "unload from memory" or whatever i can use to "reload" the content in each panel i will be calling it?
By the way, no layout issues anymore.

19 Aug 2011, 4:25 AM
If something doesn't seem to exist, maybe you're running into scoping issues?

Anyway, some code would be nice, because debugging plain text can be quite difficult ;)