Not able to create NativeWindow using Ext.air package
I am using Ext 2.2.1 and I want to create a simple NativeWindow using Ext.air package. I receive the following error message in Firebug:
Quote:
air is not defined
Source code: hello.html
Code:
<html>
<head>
<title>Hello Example</title>
<link rel="stylesheet" type="text/css" href="ext-2.2.1/resources/css/ext-all.css"/>
<script type="text/javascript" src="ext-2.2.1/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext-2.2.1/ext-all.js"></script>
<script type="text/javascript" src="ext-2.2.1/air/ext-air.js"></script>
<script type="text/javascript" src="hello.js"></script>
<!-- Common Styles for the examples -->
<link rel="stylesheet" type="text/css" href="ext-2.2.1/examples/shared/examples.css"/>
</head>
<body>
<script type="text/javascript" src="ext-2.2.1/examples/shared/examples.js"></script>
<h1>Hello World Window</h1>
<p>This example shows how to create a very simple modal Window with "autoTabs" from existing markup.</p>
<input type="button" id="show-btn" value="Hello World" /><br /><br />
<p>Note that the js is not minified so it is readable. See <a href="hello.js">hellos.js</a> for the full source code.</p>
<div id="hello-win" class="x-hidden">
<div class="x-window-header">Hello Dialog</div>
<div id="hello-tabs">
<!-- Auto create tab 1 -->
<div class="x-tab" title="Hello World 1">
<p>Hello...</p>
</div>
<!-- Auto create tab 2 -->
<div class="x-tab" title="Hello World 2">
<p>... World!</p>
</div>
</div>
</div>
</body>
</html>
Source code: hello.js
Code:
Ext.onReady(function(){
var win;
var button = Ext.get('show-btn');
button.on('click', function(){
// create the window on the first click and reuse on subsequent clicks
if(!win){
win = new Ext.air.NativeWindow({
id: 'win1',
file: 'history.html',
width:500,
height:350,
resizable: true
});
}
win.show(button);
});
});