Results 1 to 7 of 7

Thread: Component.showBy always expects an Ext.Component as reference element

Hybrid View

Previous Post Previous Post   Next Post Next Post
    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1179 in a recent build.
  1. #1
    Sencha User
    Join Date
    Mar 2009
    Posts
    240
    Vote Rating
    1
      0  

    Default Component.showBy always expects an Ext.Component as reference element

    Code:
    var pnl=new Ext.Panel({html:'Some content'});
    pnl.showBy(Ext.getBody());
    The above code generates an exception. showBy only accepts an Ext.Component, passing Ext.Element throws an error: "Cannot read property "dom" of undefined".

    And I believe the problem lies in this line of Ext.Component.alignTo:

    Code:
    varg = h.element,
    
    I believe Ext.Components have a element property, but Ext.Element don't have it.

  2. #2
    Sencha User
    Join Date
    Mar 2009
    Posts
    240
    Vote Rating
    1
      0  

    Default

    Changing that line in alignTo method should make it work:

    Code:
    var alignElement = alignTo.element || alignTo,

  3. #3
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
      0  

    Default

    Thank you for the report.

    Sencha Inc

    Jamie Avins

    @jamieavins

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Until this gets fixed, you can fake it:

    Code:
    panel.showBy({
        element : el
    });
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  5. #5
    Sencha User Jacky Nguyen's Avatar
    Join Date
    Jul 2009
    Location
    Palo Alto, California
    Posts
    469
    Vote Rating
    18
      0  

    Default

    This has been addressed in the next release (beta 1).
    Sencha Touch Lead Architect

  6. #6
    Sencha User
    Join Date
    Mar 2009
    Posts
    240
    Vote Rating
    1
      0  

    Default

    Great, thanks Jacky!!!

Posting Permissions

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