-
11 Mar 2011 10:38 AM #1
[FIXED]Floating components have no ownerCt property/floatParent is not documented
[FIXED]Floating components have no ownerCt property/floatParent is not documented
I have created a component which extends Ext.Component and set the "floating" attribute to true.
I need to get a reference to the container of the component so I can call getEl() on the container. I am trying to do this in onRender, but when that override is called ownerCt has been deleted!
The framework saves a reference to ownerCt in "floatParent" but that property isn't documented and I'm not sure if I should be using it.
Is this a documentation bug, framework bug, or my bug? If there is a guide for creating floating components please let me know.
Thanks for your time!
Justin
-
12 Mar 2011 9:24 PM #2
Small test case:
Code:Ext.onReady(function() { var c = Ext.create('Ext.Component', { floating: true, html: 'Foo!', width: 100, height: 100 }); Ext.create('Ext.panel.Panel', { width: 400, height: 400, renderTo: document.body, items: c }); c.show(); console.log(c.ownerCt); });Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
13 Mar 2011 12:54 AM #3
Yes, this does need documenting.
I'll add some documentation about what's going on.
A floating Component cannot really have an ownerCt because there are upward links from layout managers which use the ownerCt to rearrange the ownerCt when the child changes size.
So a different reference is kept for floating Components, and that's floatParent. Well done on digging it all up yourself in the absence of docs!Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
14 Mar 2011 7:54 AM #4
-
14 Mar 2011 8:22 AM #5
I've just spent a good while composing some hopefully coherent and meaningful prose to describe the ins and outs of floating Components. It should make the next release of the lib and docs.
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
17 Mar 2011 11:06 AM #6
In PR4?
In PR4?
Did your write up make it into PR4? I'd love to read it.
-
18 Mar 2011 4:58 AM #7
Didn't make it into PR4. You should see it soon though.
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
You found a bug! We've classified it as
a bug in our system.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
Similar Threads
-
Help on how-to add Gridpanel on tree click (error: Cannot read property 'ownerCt')
By elsendoorn in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 19 Mar 2011, 11:54 AM -
Cannot read property 'ownerCt' of undefined
By qbert65536 in forum Sencha Touch 1.x: DiscussionReplies: 3Last Post: 23 Sep 2010, 3:42 PM -
[CLOSED] Panel's renderer property not documented
By grubi in forum Ext 3.x: BugsReplies: 2Last Post: 24 Aug 2010, 10:31 AM -
component ownerCt property always undefined ..
By wtfowned in forum Ext 2.x: Help & DiscussionReplies: 6Last Post: 27 Jul 2008, 8:01 AM -
[Ext2.0_rc1] Ext.Toolbar and missing 'ownerCt' property
By pic_Nick in forum Ext 2.x: Help & DiscussionReplies: 8Last Post: 27 Nov 2007, 9:55 PM


Reply With Quote
