1. #101
    Sencha User
    Join Date
    Dec 2008
    Posts
    105
    Vote Rating
    0
    piroman is on a distinguished road

      0  

    Default


    thanks for your effort

    will try it and see

  2. #102
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    330
    Vote Rating
    1
    PranKe01 is on a distinguished road

      0  

    Default


    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();
    		}
    	};

  3. #103
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    20
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    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

  4. #104
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    20
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    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

  5. #105
    Sencha User
    Join Date
    Oct 2009
    Posts
    15
    Vote Rating
    0
    seltzlab is on a distinguished road

      0  

    Default


    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
    Code:
    var file = air.File.applicationDirectory.resolvePath(dbFile),
    to
    Code:
    var file = dbFile,
    'cause my db file is not in the application directory but in the app-storage directory.
    Maybe would be better let the programmer open the dbfile ?

  6. #106
    Sencha User
    Join Date
    Oct 2009
    Posts
    15
    Vote Rating
    0
    seltzlab is on a distinguished road

      0  

    Default


    It seems that store.filter(fieldname, value) does nothing? Possible?

  7. #107
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    20
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    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
    Code:
    new Ext.data.SQLiteDB({
        dbFile: air.File.applicationStorageDirectory.resolvePath('myDb.db').nativePath
    });
    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.

    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, makana
    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

  8. #108
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    20
    makana has a spectacular aura about makana has a spectacular aura about

      0  
    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

  9. #109
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    330
    Vote Rating
    1
    PranKe01 is on a distinguished road

      0  

    Default


    Great

    P.S. You always wrote draffable instead of draggable in the docs Great work, anyway!

  10. #110
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    20
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    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