1. #1
    Ext User
    Join Date
    Jul 2008
    Posts
    78
    Vote Rating
    0
    carbotex is on a distinguished road

      0  

    Default [Solved] Ext.air.Notify doesn't display background.

    [Solved] Ext.air.Notify doesn't display background.


    I'm using Windows XP with plain black background. I can't see the notification message due to the foreground color is black on black background. Where do I need to look to add custom rounded-corners rectangle as the background?

  2. #2
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,518
    Vote Rating
    376
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    I guess that you would get better response if you posted in the Air forum: http://extjs.com/forum/forumdisplay.php?f=23 Do you want me to move this thread there?
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  3. #3
    Ext User
    Join Date
    Jul 2008
    Posts
    78
    Vote Rating
    0
    carbotex is on a distinguished road

      0  

    Default


    Sure

  4. #4
    Ext User
    Join Date
    Jul 2008
    Posts
    78
    Vote Rating
    0
    carbotex is on a distinguished road

      0  

    Default


    Ok, it looks like the background is handled by "ext-all.css" But I still can't see the background. Any idea?

  5. #5
    Sencha User bereal's Avatar
    Join Date
    Apr 2007
    Location
    Geneva, Switzerland
    Posts
    92
    Vote Rating
    0
    bereal is on a distinguished road

      0  

    Default


    The same problem, just installed Ext JS Library - Air Support 0.30

    Calling

    Code:
        var sample = new Ext.air.Notify({
            msg: "Test error",
            icon: 'images/error.png'
        });
    displays notification with transparent background
    Ext JS + Adobe AIR solutions

  6. #6
    Ext User
    Join Date
    Jul 2008
    Posts
    78
    Vote Rating
    0
    carbotex is on a distinguished road

      0  

    Default


    Found the culprit with the Notify background issue. In the application.xml you have to use 1.1 namespace instead of 1.5. The background won't show if you are using 1.5.

    Code:
    <?xml version="1.0" encoding="utf-8" ?>
    <application xmlns="http://ns.adobe.com/air/application/1.1">
    Maybe this is a bug? But it's working now ...

  7. #7
    Ext User
    Join Date
    Mar 2009
    Posts
    2
    Vote Rating
    0
    ciaogrant is on a distinguished road

      0  

    Default A better fix?

    A better fix?


    I had the same issue even when using the 1.1 xmlns, and actually found the issue to be that the "ext-all.css" file referenced in the newly created NativeWindow has a hard-coded path of "../extjs/resources/css/ext-all.css", and so would only work if the stylesheet was loaded there.

    You can either change the hard-coded path in ext-air.js, or pass in the proper path using something like:

    Code:
    var notification = new Ext.air.Notify({
                            msg: 'Example', hideDelay: 6000, 
                            extAllCSS:'app:/lib/extjs-2.2.1/resources/css/ext-all.css'
                        });
    Hope that helps.

  8. #8
    Ext User
    Join Date
    Jul 2008
    Posts
    78
    Vote Rating
    0
    carbotex is on a distinguished road

      0  

    Default


    I tried that. It doesn't work.

  9. #9
    Ext User
    Join Date
    Mar 2009
    Posts
    2
    Vote Rating
    0
    ciaogrant is on a distinguished road

      0  

    Default


    Quote Originally Posted by carbotex View Post
    I tried that. It doesn't work.
    I assume you changed the path for the extAllCSS value to match your own application? I know it's sometimes silly, but thought I'd check.

    If you post the code you are using to create your Notify, along with any errors you may have, that might help someone troubleshoot your issue better.

  10. #10
    Ext User
    Join Date
    Jul 2008
    Posts
    78
    Vote Rating
    0
    carbotex is on a distinguished road

      0  

    Default


    Here is mine:

    Code:
    var sample = new Ext.air.Notify({
      msg: 'New Mail',
      icon: 'icons/new.png',
      extAllCss: 'lib/extjs/resources/css/ext-all.css'
    });
    I even tried:
    Code:
    var sample = new Ext.air.Notify({
       msg: 'New Mail',
       icon: 'app:/icons/new.png',
       extAllCss: 'app:/lib/extjs/resources/css/ext-all.css'
     });
    The background fails to show if I use:
    <application xmlns="http://ns.adobe.com/air/application/1.5">

    But it works when I modified the xmlns to:
    <application xmlns="http://ns.adobe.com/air/application/1.1">

    I found this out by comparing the Ext.Player source file as suggested by Aaron. Ext.Player is also experiencing the same issue if I modified the xmlns from 1.1 to 1.5

    At least for me it's working now with this solution.