Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Ext.air.MainWindow

  1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    3,128
    Vote Rating
    4
      0  

    Default Ext.air.MainWindow

    What happened to Ext.air.MainWindow, which was how the custom ext-native chrome was explained in this original blog post: http://extjs.com/blog/2007/06/29/bui...-and-red-bull/
    This seemed to be one of the major selling points of ext-air, and then it just silently dissapeared...

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    20
      0  

    Default

    The problem had to do with the change of the AIR security model. However, now that it is compatible again (meaning no internal iframe needed), I am sure it could be ported over pretty easy.
    Jack Slocum
    Sencha Co-Founder, Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum

  3. #3
    Ext User
    Join Date
    Jul 2007
    Posts
    3,128
    Vote Rating
    4
      0  

    Default

    I did make some progress on this, but do not yet have any code to post.
    The APIs have changed a bit, but not enough to break things. The part that has me unsure what to do next is that the old Ext.air.mainWindow implementation seems very different from the new Ext.air.nativeWindow code, being that mainWindow extends panel and nativeWindow extends observable.
    I will work on getting an updated version of my telnet app ready to post.

  4. #4
    Sencha User Phunky's Avatar
    Join Date
    Jun 2007
    Location
    West Yorkshire
    Posts
    341
    Vote Rating
    0
      0  

    Default

    I would be very intrested to know whats going on with this also

  5. #5
    Ext User
    Join Date
    Jul 2007
    Posts
    3,128
    Vote Rating
    4
      0  

    Default

    I am going to have to give up on this again for now. It was all working perfect, now nothing displays at all (including the main window) unless i do something that brings up the introspector console. I am very confused how this can be, and am thinking its a bug in air itself.

  6. #6
    Sencha User Phunky's Avatar
    Join Date
    Jun 2007
    Location
    West Yorkshire
    Posts
    341
    Vote Rating
    0
      0  

    Default

    Are you using Ext 2.0.2 or Ext 2.1?

  7. #7
    Ext User
    Join Date
    Jul 2007
    Posts
    3,128
    Vote Rating
    4
      0  

    Default

    Using 2.1

  8. #8
    Sencha User amitava's Avatar
    Join Date
    Mar 2007
    Posts
    29
    Vote Rating
    0
      0  

    Default

    Does it make for a temporary solution?

    Code:
    Ext.onReady(function(){
        var win = new Ext.Window({
            id: 'window',
            contentEl: 'win',
            title: 'Custom Chrome',
            width: 395,
            height: 495,
            resizable: false,
            minimizable: true,
            listeners: {
                close: function(){
                    window.nativeWindow.close();
                },
                minimize: function(){
                    window.nativeWindow.minimize();
                }
            }
        }).show();
        
        // to allow to move the native window by dragging Ext.Window header
        Ext.select('#window div.x-window-header').on('mousedown', function(){
            window.nativeWindow.startMove();
        });
    });

  9. #9
    Ext User MuratCorlu's Avatar
    Join Date
    Oct 2007
    Location
    Istanbul, Turkey
    Posts
    30
    Vote Rating
    0
      0  

    Default

    Ext.air.Window still is not working, is it?

  10. #10
    Ext User amon's Avatar
    Join Date
    Apr 2007
    Location
    Budapest
    Posts
    109
    Vote Rating
    1
      0  

    Default Workaround for using custom window

    This is a basic workaround to using Ext window instead of chrome. It's not perfect, but it is a test. I just playing with AIR 1.1 and Ext 2.1

    Code:
    Ext.onReady(function(){
    	var win = new Ext.air.NativeWindow({
    	    id: 'mainWindow',
    	    instance: window.nativeWindow,
    		width: screen.width,
    		height: screen.height
    	});
    	win.moveTo( 0, 0 );
    	var xwin = new Ext.Window({
    		title: 'AIR test',
    		width: 400,
    		height: 200,
    		autoHeight: false,
    		resizable: true,
    		collapsible: true,
    		maximizable: true,
    		minimizable: true,
    		constrain: true,
    		listeners: {
    			close: function() { win.close(); },
    			minimize: function(){ win.getNative().minimize() }
    		}
    	});
    	xwin.show();
    });
    plus: You must set the next variables in the application.xml:
    Code:
    		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
    		<systemChrome>none</systemChrome>
    
    		<!-- Whether the window is transparent. Only applicable when systemChrome is false. Optional. Default false. -->
    		<transparent>true</transparent>
    test.air, installable file

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •