-
4 Dec 2011 10:36 AM #1
Component.showBy always expects an Ext.Component as reference element
Component.showBy always expects an Ext.Component as reference element
The above code generates an exception. showBy only accepts an Ext.Component, passing Ext.Element throws an error: "Cannot read property "dom" of undefined".Code:var pnl=new Ext.Panel({html:'Some content'}); pnl.showBy(Ext.getBody());
And I believe the problem lies in this line of Ext.Component.alignTo:
I believe Ext.Components have a element property, but Ext.Element don't have it.Code:varg = h.element,
--
Rahul Singla
-
4 Dec 2011 10:40 AM #2
Changing that line in alignTo method should make it work:
Code:var alignElement = alignTo.element || alignTo,
--
Rahul Singla
-
5 Dec 2011 9:20 AM #3Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,659
- Vote Rating
- 14
Thank you for the report.
-
11 Dec 2011 6:26 PM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
Until this gets fixed, you can fake it:
Code:panel.showBy({ element : el });Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
26 Jan 2012 9:18 PM #5Sencha - Sencha Touch Dev Team
- Join Date
- Jul 2009
- Location
- Palo Alto, California
- Posts
- 469
- Vote Rating
- 9
This has been addressed in the next release (beta 1).
Sencha Touch Lead Architect
-
26 Jan 2012 11:19 PM #6
Great, thanks Jacky!!!
--
Rahul Singla
-
5 Nov 2012 11:06 AM #7
The documentation doesn't indicate that you can use an Element instead of a Component. Should probably be updated.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-1179
in
2.0.


Reply With Quote