1. #1
    Sencha User Fire-Dragon-DoL's Avatar
    Join Date
    Dec 2011
    Posts
    141
    Answers
    9
    Vote Rating
    1
    Fire-Dragon-DoL is on a distinguished road

      0  

    Default Answered: Get if a window is modal

    Answered: Get if a window is modal


    Outside the window class, (or even inside an event of that window) I would like to see if it's modal

    I know it's a config but I need it to disable the taskbar when my window becomes active if it's modal :\ (it's a desktop-like app)

  2. No problem, I found the solution: in the constructor the config is applied after callParent, so in constructor is a bit problematic effectively find out the modal value.

    I solved by moving code to initComponent, there I can access it simply with "this.modal" and do some stuff

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Like this?

    Code:
    var win = new Ext.window.Window({
        width  : 400,
        height : 400,
        title  : 'Test',
        html   : 'test',
        modal  : true
    });
    
    win.show();
    
    console.log(win.modal);
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User Fire-Dragon-DoL's Avatar
    Join Date
    Dec 2011
    Posts
    141
    Answers
    9
    Vote Rating
    1
    Fire-Dragon-DoL is on a distinguished road

      0  

    Default


    Mhh, I set modal in my window class (Ext.define), however when I write myinstance.modal it returns 'undefined', not true nor false (I set it to true).

    Note that I'm checking it not in the scope of the class, I'm from a controller which is getting a ref to that view and then check the modal value.

    I found I can access "modal" only in the constructor of the window

  5. #4
    Sencha User
    Join Date
    Dec 2011
    Posts
    220
    Answers
    13
    Vote Rating
    9
    dedoz will become famous soon enough

      0  

    Default


    Prolly the problem is on the line of code where u are getting the reference to the view.

    You can do console.log(myInstance) and check on firebug console or similar the whole structure of your object. Check there if others confings of you view are set. if none of them are there, then u have a problem on getting the reference to the view class.

    (sorry for my bad english)

  6. #5
    Sencha User Fire-Dragon-DoL's Avatar
    Join Date
    Dec 2011
    Posts
    141
    Answers
    9
    Vote Rating
    1
    Fire-Dragon-DoL is on a distinguished road

      0  

    Default


    No problem, I found the solution: in the constructor the config is applied after callParent, so in constructor is a bit problematic effectively find out the modal value.

    I solved by moving code to initComponent, there I can access it simply with "this.modal" and do some stuff

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi