View Full Version : Problems with refs in controller

11 Mar 2013, 11:14 PM

I made a post (http://www.sencha.com/forum/showthread.php?258385-Help-with-using-refs-in-control-function) in discussion part of forum regarding trouble with refs that I have but after some more trial and error I came across another problem.
If I define refs as:

refs: [{
ref: 'blabla',
selector: 'some selector',

But if I try to define them as this (as seen in some other posts while trying to solve my problem) I get "TypeError: Cannot call method 'charAt' of undefined"

refs: [{
'blabla': 'some selector',

13 Mar 2013, 1:12 PM
If you do it like the first snippet it works?

13 Mar 2013, 11:22 PM
Yes, that is the case.
It says error occurred in ext-debug.js:855

18 Mar 2013, 12:01 AM
This continues to trouble me in ExtJS4.2 also.
Only this time it says it occurred at ext-debug.js:1001

27 Mar 2013, 2:09 PM
I get this problem as well.

The following simplified refs syntax breaks with "Uncaught TypeError: Cannot call method 'charAt' of undefined".

'myComponent':'#myItemId myxtype'

The last call in ExtJs I can tell is "Ext.String.capitalize".

Chrome version 25 and Firefox 15.0
ExtJs version 4.1.3
OSX 10.6.8

I haven't tested it in other enviornments.