[CLOSED] Window toFront: true

  1. #1

    [CLOSED] Window toFront: true

    Using the following code to create a client window.

    function CreateDesktopWindow(title, id) {
                if (top.winWijzigBestuurder) {
                    top.winWijzigBestuurder.destroy();
                }
                var win = new top.window.Ext.Window({
                    id: 'winWijzigBestuurder',
                    title: 'Test',
                    width: 500,
                    height: 520,
                    Icon: "UserEdit",
                    maximizable: false,
                    minimizable: false,
                    toFront: true,
                    constrainHeader: true,
                    autoLoad: {
                        showMask: true,
                        mode: "iframe",
                        url: "lease/BestuurderWijzigen.aspx?volgnummer=" + id
                    }
                });
                win.show();
            }
    ..and it works...but..

    When looking into the Chrome element inspector I see the following error in webresource.axd:

    Uncaught TypeError: Property 'toFront' of object [object Object] is not a function
    It's found on the Sencha site here: http://dev.sencha.com/deploy/dev/doc...Window-toFront

    Also..did it on Vlad's advise: http://forums.ext.net/showthread.php...hlight=toFront

    Where is my error ?

    Martin
    Last edited by geoffrey.mcgill; Jan 23, 2011 at 4:00 AM. Reason: [CLOSED]
  2. #2
    Hi Martin,

    This error is reproducible under all browsers.

    .toFront() is a method, not a config option. So, when you define
    toFront: true
    in Window's constructor it overrides .toFront() method and it becomes just 'true'.

    Then .toFront() is invoked automatically after showing a window, so you have to just remove toFront from your code.

Similar Threads

  1. Replies: 10
    Last Post: Apr 25, 2013, 5:38 AM
  2. Replies: 3
    Last Post: Mar 19, 2012, 12:35 PM
  3. [CLOSED] Move a window to the left with constrainHeader = true
    By softmachine2011 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 01, 2011, 10:43 AM
  4. [CLOSED] Radio component inside window hidden=true
    By jeybonnet in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 10, 2010, 8:52 PM
  5. [CLOSED] Focus TextField if Window Hide=true
    By macap in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 12, 2010, 1:59 PM

Posting Permissions