-
20 Feb 2009 1:57 AM #1
Desktop Multiple Windows
Desktop Multiple Windows
Hi,
I was playing with the Desktop example.
Is there anyway I can create multiple windows from the same desktop icon?
Currently when I tried that, by commenting out the id part, It opened the window, but seems like they are all interlinked as changes on one reflect in the other.
PLease help!!
-
20 Feb 2009 2:38 AM #2
Re: Desktop Multiple Windows
Re: Desktop Multiple Windows
yeah it's possible on how you want to structure your appliaction but you could start exploring here
-
20 Feb 2009 3:07 AM #3
MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow
-
20 Feb 2009 3:30 AM #4
sorry..
Code:// Calling instance MyDesktop = new Ext.app.App({ getModules: function(){ return [ new MyDesktop.StateTreeWindow()]; ... }}) // Creating window MyDesktop.StateTreeWindow = Ext.extend(Ext.app.Module, { id: 'statetree-win', init: function(){ this.launcher = { text: 'State Tree', iconCls: 'icon-statetree', handler: this.createWindow, scope: this } }, createWindow: stateTreeWindow }); // window creation var stateTreeWindow = function DrawStateTreeWindow(){ stateTreeWin = desktop.createWindow({ //id: 'statetree-win', // Commented id so that we can have multiple windows with different ids title: 'State Tree', iconCls: 'icon-statetree', shim: false, animCollapse: false, constrainHeader: true, items: [{..}]}) } }
-
20 Feb 2009 3:32 AM #5
-
20 Feb 2009 4:11 AM #6
Ok, so you have an icon that has a handler. That handler refers to a function to do something....in your current case, create ONE window. So modify that function to create two windows, three windows, whatever you want...
MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow
-
20 Feb 2009 4:38 AM #7
No its not that handler..
I need to create a single window instance everytime I click on icon.
But right now when I click on icon, even though it creates multiple windows, the internal data gets all shared
-
20 Feb 2009 5:21 AM #8
clear as mud...
MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow
-
20 Feb 2009 12:22 PM #9
RE:
RE:
mjlecomte is right. If you want to be able to create multiple window or different window from the same actionthe function that creates the windows have to be taking some parameters so as to know which window to return at runtime or if I missed the point like wanting to check if a particular window has been created so as not to create it again is that the problem?


Reply With Quote
