-
23 Feb 2011 5:21 AM #1
[CLOSED]Component.ref does not work anymore
[CLOSED]Component.ref does not work anymore
has the config option ref of class Component been removed?
In Ext 3.3 I used this technique to get a reference to a component quite frequently because it produces much more readable code.
Is this available in Ext 4.0 or will it come back?
-
23 Feb 2011 6:39 AM #2
It have been replaced with ComponentQuery, see aconran's post here: http://www.sencha.com/forum/showthre...8-Ref-Property
-
-
23 Feb 2011 7:40 AM #3
thank you. I´ve already seen this new class but it makes the code more unreadable than
In Ext 3.3 I usedPHP Code:Ext.getCmp('myId').on(...)
and with ComponentQuery it would bePHP Code:this.myId.on(...)
Decide by yourself which on is most readable. I hope the guys from Sencha read this and reconceive their decision to remove the ref config option.PHP Code:Ext.ComponentQuery.query('#myId')[0].on(...)
-
23 Feb 2011 2:05 PM #4
Code:// for direct child this.child('selector').on(....); // for first matching child, any level this.down('selector').on();Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
23 Feb 2011 2:39 PM #5
i think ref was not a bad idea, however you had to know the level of the component.
There was already a discussion, and i hope to get something like referenced items in a component for easy assign.
Easy would be a wrapper for ComponentQuery like this.getChildComponent(selector) - i prefer such for better readability, and to be different from DOM queries. At the end it's also a kind of taste.vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
23 Feb 2011 3:06 PM #6
@steffenk
Those methods are there. Container has:
query
child
down
Component has:
upEvan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
Posts edit seems do not work anymore.
By AndreaCammarata in forum Community DiscussionReplies: 3Last Post: 31 Jan 2011, 10:42 AM -
add(Component) does not work anymore with 0.99
By konki_vienna in forum Sencha Touch 1.x: DiscussionReplies: 2Last Post: 5 Nov 2010, 7:37 PM -
[CLOSED][3.1] <Component>.add(<Panel>) doesn't work
By wceuppens in forum Ext 3.x: BugsReplies: 2Last Post: 21 Dec 2009, 5:01 AM -
adobe air 1.5 released - SWFUpload does not work anymore
By bjt in forum Ext.air for Adobe AIRReplies: 2Last Post: 2 Dec 2008, 6:08 AM


Reply With Quote