[CLOSED] Keymap in Desktop Window

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Keymap in Desktop Window

    Hi,

    I get the error when I register a keymap. Please check the following code. It only happens with Desktop window.

    Both keymaps will show error. After you have tested this code, just remove keymp in desktopwindow, you will get error from 2nd keymap.

    <ext:Desktop 
        ID="MyDesktop" 
        runat="server" 
        BackgroundColor="White" 
        ShortcutTextColor="Black"
        />
    
    <ext:DesktopWindow runat="server" ForceLayout="true" ID="winDesk" Height="400" Width="500">
        <Items>
            <ext:Panel runat="server">
                <Items>
                    <ext:TextField runat="server" ID="txt"></ext:TextField>
                </Items>
            </ext:Panel>
        </Items>
        <KeyMap>
            <ext:keybinding Scope="#{txt}" >
                <keys>
                    <ext:key code="ENTER" />
                </keys>
                <Listeners>
                    <Event Handler="alert('Enter Pressed');" /> 
                </Listeners>
            </ext:keybinding>
        </KeyMap>
    </ext:DesktopWindow>
    
    <ext:KeyMap runat="server" Target="#{winDesk}">
        <ext:keybinding Scope="#{txt}" >
            <keys>
                <ext:key code="ENTER" />
            </keys>
            <Listeners>
                <Event Handler="alert('Enter Pressed');" /> 
            </Listeners>
        </ext:keybinding>
    </ext:KeyMap>
  2. #2

    RE: [CLOSED] Keymap in Desktop Window

    Hi,

    Window is not rendered yet when you try create KeyMap.
    I recommend to use inner KeyMap (inner property KeyMap of the Window). All inheritors of the PanelBase has KeyMap property
  3. #3

    RE: [CLOSED] Keymap in Desktop Window

    In the example that I gave you... I have key map in both... and both give error....

    Even if you put it in Panel KeyMap binding... u will get an error...
  4. #4

    RE: [CLOSED] Keymap in Desktop Window

    Hi,

    I think the problem with inner KeyMap related with Scope property which you defined. When KeyMap config object to the window constructor the TextField is not created yet. Therefore the Scope is null which is not allowed. Can you provide more details what the reason to define such scope?
  5. #5

    RE: [CLOSED] Keymap in Desktop Window

    Can I email you the link to check it?
  6. #6

    RE: [CLOSED] Keymap in Desktop Window

    Hi,

    Yes, of course you can email the link to the support email.


    But the reason Scrope property. If you remove it then KeyMap is working (keyMap cannot referenced on unexisting control).
    Try to set LazyMode="Instance" for TextField to resolve the problem
  7. #7

    RE: [CLOSED] Keymap in Desktop Window

    Yes it works!!!...

    I will still email u to check... with details...


    Thanks,
  8. #8

    RE: [CLOSED] Keymap in Desktop Window

    Just sent an email to support [at] coolite [dot] com
  9. #9

    RE: [CLOSED] Keymap in Desktop Window

    Hi Amit,

    Did you receive my answer? Do you have any additional questions regarding this topic?
  10. #10

    RE: [CLOSED] Keymap in Desktop Window

    you meant o email? No i dint receive...
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] V2.0 DeskTop window
    By Aurelio in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 20, 2012, 12:51 PM
  2. [CLOSED] Minimize window created in another desktop window
    By CarWise in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 03, 2011, 1:46 PM
  3. Refreshing desktop control from desktop window
    By AnilVelamuri in forum 1.x Help
    Replies: 0
    Last Post: May 26, 2010, 7:53 AM
  4. KeyMap not working for whole window
    By dbassett74 in forum 1.x Help
    Replies: 3
    Last Post: May 21, 2009, 1:55 PM
  5. Replies: 3
    Last Post: Feb 03, 2009, 5:57 PM

Posting Permissions