View Full Version : from 3.2.0 to 3.0.3 - problem with scope / refs / autoref
15 Aug 2010, 12:11 PM
Hi, (I am not sure if this is a designer specific question or not!) I developed an app using Extjs 3.2.0 and need to get it working with ExtJS 3.0.3.... I used the 'autoref' property in the designer frequently and when I use 3.2.0 source the app works fine. When I point it to the 3.0.3 source, it fails right off the bat in my Viewport's initComponent function. The problem seems to be with refs... (i have a button called btnBack and designer has set the ref property to ref: '../../../btnBack'.) When I try 'this.btnBack' from the viewport's initComponent function, it returns undefined. Can you tell me if there was a significant change to the behavior of the ref property between 3.0.3 and 3.2.0, or if I've made an obvious mistake? Note: I can use Ext.getCmp('btnBack') and the correct object is returned, but I don't want to use getCmp for obvious reasons. Any help would be appreciated! EDIT: I should mention that I did not re-export my code inside the designer in order to switch to 3.0.3. I simply changed the src's of the script tags in the index.html document. Maybe I need to change the location of source in the designer and rebuild the project?
15 Aug 2010, 7:52 PM
I'm not very certain when refs were introduced...whether it was with 3.0 proper or shortly thereafter. There have been a significant number of changes in 3.2+ from 3.0.3, and there are dozens of things that are designable and configurable in the Designer that will simply not work in 3.0.3, so it is not advised.
I can move this thread to another forum if you wish, for a more precise answer? Just let me know.
16 Aug 2010, 8:49 PM
No, your reply was perfect. I was hoping to get confirmation that 3.0.3 & ExtJS Designer-generated code, together, were not "officially supported", or to put it another way, "just a bad idea". :) Your reply was enough to push my team towards the best resolution to this problem: upgrading to ExtJS 3.2.x... We're going with 3.2.1.
So, once again, thanks for taking the time to read and provide insight to another post! I really appreciate it.
This forum wouldn't be the wonderful resource that it is today, if it wasn't for you and the other Ext-perts like you, (you know who you are) that have put so much time and effort into it. Kudos and "hats off" to all of you!
16 Aug 2010, 11:16 PM
That sounds perfect. The upgrade is usually pretty smooth between minor versions, the team takes extra special care not to introduce any breaking changes...and if there ever were, they are usually documented in release notes. 3.2.1 is perfect.
In the future, the Designer will support projects that target 3.2, 3.3, and 4.0+, as well as Sencha Touch. So while we're stuck at 3.2 now, as new versions come out, the Designer won't force upgrades as long as the Ext JS version is still under official support.
Thanks for the kind words! Much appreciated.
Powered by vBulletin® Version 4.1.5 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.