Results 1 to 5 of 5

Thread: How do I open a module in Desktop example?

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    130
    Answers
    4

    Default How do I open a module in Desktop example?

    I want to open a module window from the Desktop example. I wasn't able to open a module window from within another window or from a console.

    I have tried to use:

    Code:
    var module2 = Desktop.app.getModule("grid-win"), window;
    
    if (module2) {
        window = module2.createWindow();
        window.show();
    }
    But the getModule() method doesn't exist in the Desktop.app.

    What else can I do to fire up a module window?

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    I haven't tested this, but peeking at the code it looks like it would be
    Code:
    var desktop = this.app.getDesktop();
    var module2 = desktop.getWindow('grid-win');

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    130
    Answers
    4

    Default

    Sadly it didn't work. I've tried:

    Code:
    pokemon: function(){console.log("pokemon");
        var desktop2 = this.app.getDesktop();
        var module2 = desktop2.getWindow('grid-win');
        if (module2) {
            windowv = module2.createWindow();
            windowv.show();
        }
    },

    It says:

    Code:
     TypeError: this.app is undefined
    I was unable to reach to getDesktop().

  4. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    How about this?
    Code:
    pokemon: function(){console.log("pokemon");
        var desktop2 = Desktop.app.getDesktop();
        var module2 = desktop2.getWindow('grid-win');
        if (module2) {
            windowv = module2.createWindow();
            windowv.show();
        }
    },

  5. #5
    Sencha User
    Join Date
    Aug 2011
    Posts
    130
    Answers
    4

    Default

    Quote Originally Posted by Gary Schlosberg View Post
    How about this?
    Code:
    pokemon: function(){console.log("pokemon");
        var desktop2 = Desktop.app.getDesktop();
        var module2 = desktop2.getWindow('grid-win');
        if (module2) {
            windowv = module2.createWindow();
            windowv.show();
        }
    },
    It says:
    TypeError: Desktop.app.getDesktop is not a function[Learn More]
    When I type Desktop.app.get in the console I don't get getDesktop()

Similar Threads

  1. Get Active Module in Desktop App
    By hectorgomis in forum Ext 5: Q&A
    Replies: 2
    Last Post: 8 Sep 2015, 11:01 PM
  2. Replies: 7
    Last Post: 18 Nov 2014, 1:05 PM
  3. Web Desktop Example's Module
    By switchover in forum Ext: Q&A
    Replies: 2
    Last Post: 17 Jan 2013, 7:37 PM
  4. MSN module for Desktop 2.0
    By pgiuseppe in forum Community Discussion
    Replies: 4
    Last Post: 2 Jan 2008, 7:38 PM
  5. Desktop Example - What the point of the module.js?
    By Phunky in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 26 Nov 2007, 6:00 AM

Tags for this Thread

Posting Permissions

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