-
21 Mar 2010 9:27 AM #121
updated to latest version and doesnt work anymore
here is a simple example of a Ext.air.Window
Code:new Ext.air.Window({ id: 'mainwindow', layout: 'border', transparent: 'utility', minimizeToTray: true, minWidth: 300, minHeight: 200, minimizable: true, maximizable: true, iconCls: 'mainicon', tbar: this.menu, items: [{ region: 'west', title: 'Folders', border: false, split: true, width: 210, layout: 'fit', minSize: 175, maxSize: 400, collapseMode: 'mini', collapsible: true },{ region: 'center', layout: 'fit' },{ region: 'south', border: false, split: true, collapseMode: 'mini', height: 50, minSize: 50, maxSize: 50 }] });
-
21 Mar 2010 10:59 AM #122
WHAT does not work?
It has to bebut that should not be the problem... Please define "not work"!Code:type:'utility'
Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)
Enhanced ExtJS adapter for Adobe AIR
-
21 Mar 2010 11:01 AM #123
window is not showing up
even with the
Code:type:'utility'
-
21 Mar 2010 11:11 AM #124
call a window.show() or define your window with hidden:false (it is true by default).
Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)
Enhanced ExtJS adapter for Adobe AIR
-
21 Mar 2010 11:14 AM #125
window.show() or hidden:false doesn't work either
-
21 Mar 2010 11:37 AM #126
Then, only one more thing can be the reason. You didn't read the docs:
http://darmsalad.da.ohost.de/?class=Ext.air.Window
With a suitable file defined (config option "file") your code works for me.Make sure, that you define a file, in which the ExtJS framework becomes loaded, otherwise the viewport won't create!Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)
Enhanced ExtJS adapter for Adobe AIR
-
21 Mar 2010 12:02 PM #127
An url to a file, that should be loaded as the window's content.Code:file: String
i dont want the window to read content from a file, i just want to create a window and create my widgets on the fly
is not very logical
that param should be optional not required
-
21 Mar 2010 12:33 PM #128
What is not logical? A new native window is a new DOM document. If you want to use Ext widgets inside it, you have to load the Ext library into that new window. There isn't something to make optional. No Ext lib - no Ext widgets, that's the thing!
So what you need is first reading a file containing script tags for the Ext library and then create widgets on the fly. The second step is, what Ext.Window does for you.
I do one simple thing. I have my main.html file, which is configured in the application.xml. There all Ext stuff and overrides etc. is included. And ONE extra file, containing code to build my root window/load my application and so on. In this extra file, I check for. In my application.xml I setCode:window.location.search == '?root'
. So I can use my main.html file for all windows.Code:<content>resources/html/main.html?root</content>
Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)
Enhanced ExtJS adapter for Adobe AIR
-
21 Mar 2010 12:47 PM #129
ok i see your point, but in my case i just use a single window which is initialized in Main.js and the html file looks like this
and in App.init() i call the Ext.air.Window which should render a native window with ext look and feel because all the scripts are included, but it doesnt workCode:<html> <head> <meta http-equiv="content-Type" content="text/html; charset=UTF-8" /> <link href="lib/ext/resources/css/ext-all.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="lib/air/AIRAliases.js"></script> <script type="text/javascript" src="lib/air/AIRIntrospector.js"></script> <script type="text/javascript" src="lib/ext/adapter/ext/ext-base-debug.js"></script> <script type="text/javascript" src="lib/ext/ext-all-debug.js"></script> <script type="text/javascript" src="lib/ext/ext-air-debug.js"></script> <script type="text/javascript" src="Main.js"></script> <script type="text/javascript"> Date.precompileFormats('y|Y-m|m|d|D|Y|F|M|F Y|M Y|M y|f Y|Y/m/d H:i|m/d/Y|m/y|m Y|D d M Y|D M d Y H:i:s O|m/d/Y H:i|YmdHi'); Ext.onReady(function() { App.init(); }); </script> </head> <body></body> </html>
that's why i said should be optional because if you already included the scripts the Ext.air.Window should show up without "file" option, and if you call the Ext.air.Window and you want to render a new Native window, then you should specify the "file" option
-
21 Mar 2010 12:57 PM #130
In that case (if you create an Ext.air.Window in a script, where Ext is already loaded, e.g. the root window), it IS already optional. You don't have to specify a file. In that case, you can even apply widget instances, not only config objects, to the items property.
But I don't see any problem in your script. For me Ext.air.Window works fully like expected. How does your Ext.air.Window script look like?
EDIT:
One thing
i just use a single window which is initialized in Main.jsWhat does that mean?in App.init() i call the Ext.air.WindowProgramming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)
Enhanced ExtJS adapter for Adobe AIR


Reply With Quote