View Full Version : Generated setter(getter?) messes w/ the property when it's an Ext.Element

5 Jun 2012, 5:48 PM
Ext version tested:
Ext 4.07


If I create a class passing a config property of type Ext.Element, when I retrieve it w/ a generated getter, it comes out as something different. This doesn't seem to be happening in 4.1, but could you please share what is being done differently and if there's an easy way to avoid this situation?

Ext.define('MY.test', {
config: {myEl: null},
constructor: function(config){this.initConfig(config);}

var instance = Ext.create('MY.test', {
myEl: Ext.getBody()

console.debug(Ext.getBody() == instance.getMyEl(), Ext.getBody(), instance.getMyEl())
//outputs: false Ext.Element.Ext.core.Element Object

6 Jun 2012, 3:31 PM
Is there a reason you do not want to use 4.1? There are many issues that were correct from 4.07


6 Jul 2012, 2:08 PM
Scott - sure (please don't misconstrue my response as being emotional or whiny). I have very bad experience with upgrading sencha lib versions even when it's bugfix releases (e.g. Ext 4.0.x up to 4.0.7; or ST 2.0.0 to 2.0.1). I'd way rather deal with familiar issues that I've either fixed or worked around then re- test/write my application. Upgrading to a minor release is a risk our company can not afford.

...and are you implying this is fixed in 4.1?

8 Jul 2012, 3:29 PM
Please read my comments about 4.07 in your other thread:

...and are you implying this is fixed in 4.1?

This doesn't seem to be happening in 4.1
It seems you have tested this and found it to be true?


30 Aug 2012, 5:48 PM
Sorry, for some reason I don't get notifications about replies on my threads. I think I tried on jsfiddle with 4.1 at the time to do a quick test to provide as much background for you guys as I can. The reason I've asked if it was fixed (despite seeing it work on 4.1) is because in my mind there's a difference between 'yes this was an issue and we addressed it' and 'can not reproduce'. Also, in the former case, there's a chance of finding exactly what's involved and comparing with my workaround.