-
11 Mar 2010 12:38 PM #101
-
12 Mar 2010 12:03 AM #102
Okay - I'll post the code like it is. I didn't extended the Notifyer, but created functions in my popupmanager and created some overrides:
Code:Ext.override(Ext.air.Notify, { onComplete: Ext.air.Notify.prototype.onComplete.createSequence(function(event) { var body = event.target.window.document.getElementsByTagName('body')[0]; body.addEventListener('click', this.closeNotify.createDelegate(this), false); c_PopupManager.movePopups(); }), closeNotify: function() { c_PopupManager.removePopup(this); this.hide(); } });Code:this.loadPopupManager = function(){ this.popupArr = []; return this; }; this.showNotify = function(text, title, ico){ if(title === undefined) title = false; if(ico === undefined) ico = false; if(c_PropertiesManager.showPopups){ var pattern = '{0}{1}'; var msg = new Ext.air.Notify({ msg: String.format(pattern, (title ? '<b>'+title+'</b><br/>' : ''), text), icon: (ico ? ico:'icons/LexIcon16.png'), extAllCSS: 'app:/lib/ext/resources/css/ext-all.css', hideDelay: c_PropertiesManager.getPopupTime()*1000 }); c_PopupManager.addPopup(msg); (function(){ c_PopupManager.removePopup(msg); }).defer(msg.hideDelay, this); } }; this.movePopups = function(){ var screensize = air.Screen.mainScreen.visibleBounds.bottomRight; var height = 0; for(var i=0; i < c_PopupManager.popupArr.length; i++){ c_PopupManager.popupArr[i].setPosition((screensize.x - c_PopupManager.popupArr[i].width), (screensize.y - c_PopupManager.popupArr[i].height - height)); height += c_PopupManager.popupArr[i].height+2; } }; this.addPopup = function(popup){ c_PopupManager.popupArr.push(popup); }; this.removePopup = function(popup){ var index = c_PopupManager.popupArr.indexOf(popup); if(index != -1){ c_PopupManager.popupArr.splice(index, 1); c_PopupManager.movePopups(); } };
-
12 Mar 2010 12:13 AM #103
Thanks for this. That was my idea, too, that there should be a manager to realize this. I'll have a look, what I could do with it. Maybe the NativeWindowManager should be enough here. I'll play with it at the weekend.
Thanks again for your help to improve the air adapter!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
-
13 Mar 2010 6:47 AM #104
UPDATE for Ext.air.Notify:
- added Boolean config option "stackable" to display the notifier above all other visibles. I used a bit simpler code to implement it, but thanks anyway @PranKe01 for your inspiration!
- config option "hideDelay" also accepts a boolean false, if you don't want to close the notifiers automatically but on click
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
-
13 Mar 2010 7:36 AM #105
Hi Makana! Thanks for your work! I'm especially using the SQLLite module, and apart from some misunderstanding with the class names, everything seems to work great (finally we get the pagination on air
).
I've only one suggestion: in the open method of the Ext.data.SQLiteDB class on line 1265 (ext-air-debug.js) I've changed this
toCode:var file = air.File.applicationDirectory.resolvePath(dbFile),
'cause my db file is not in the application directory but in the app-storage directory.Code:var file = dbFile,
Maybe would be better let the programmer open the dbfile ?
-
13 Mar 2010 8:04 AM #106
It seems that store.filter(fieldname, value) does nothing? Possible?
-
13 Mar 2010 10:41 AM #107
Hey seltzlab!
Thanks for comments! It's nice to hear, that this adapter catches some developers!
To your issues:
dbFile is expected as String, means, that it is expected as a path to a database file. So if you define
it doesn't matter if it is resolved from applicationDirectory, applicationStorageDirectory or any other directory. Maybe the doc's not clear enough here. I should add some comments here.Code:new Ext.data.SQLiteDB({ dbFile: air.File.applicationStorageDirectory.resolvePath('myDb.db').nativePath });
I've no problems with store.filter. I didn't touch this function and for me it works like expected. A little testcase could help.
Greetz, makanaProgramming 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
-
14 Mar 2010 2:42 AM #108
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
-
14 Mar 2010 5:25 AM #109
Great

P.S. You always wrote draffable instead of draggable in the docs
Great work, anyway!
-
14 Mar 2010 6:04 AM #110
Hehe
Thanks for pointing this out. I updated it!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


Reply With Quote