View Full Version : Upgrade existing Designer 2 Touch projects

8 Mar 2012, 8:52 AM
If your still using the cachefly path for your Sencha Touch Library Path (in preferences) please be sure it's updated to http://extjs.cachefly.net/touch/sencha-touch-2.0.0/

9 Mar 2012, 3:21 AM

I am pointing the lib path to the path below.

1.) I am getting getter function of a ref as undefined when I access it within init of the controller. Should I code it differently?

config: {
dataList: '#dataList',
mainNav: 'mainnav'}

control: {.

init: function() {

2). I am also getting "cannot call method replaceCls of null when I push datalist view from MainNav.

Any input?

9 Mar 2012, 7:34 AM
1.) I am getting getter function of a ref as undefined when I access it within init of the controller. Should I code it differently?

It should be put in the launch function of the controller.

9 Mar 2012, 1:26 PM
Thanks. I'll try that later this evening.

Can you also see if this is a known issue:

"I am also getting "cannot call method replaceCls of null when I push datalist view from MainNav.

I get this error the second time I click on a list item, after returning from detailed page view that was rendered after first click.

12 Mar 2012, 7:55 AM
I'm experiencing exactly the same issue pushing a form.Panel into the main nav. A solution would be well appreciated.

12 Mar 2012, 9:53 AM
well, I explicitly set the mainnavigator autodestroy property to true. That took care of it. Good luck!

12 Mar 2012, 10:25 AM
Actually all views set to auto destroy here but I'm still getting this.

12 Mar 2012, 11:07 AM
see https://github.com/philstrong/citybars
for successful usage of navigation view

12 Mar 2012, 11:34 AM
Update: I upgraded to latest version of ST2 lib and your right this is broken. Apologies for my thickheaded-ness


12 Mar 2012, 12:09 PM
Ok so a change that occurred in GA was that when you popped the nav view stack it destroys the item

Even trying using autoDestroy: false doesn't maintain children correctly .. not sure if there is a bug.

Moral here is don't try to cache items in your nav view. See Business controller where I've removed the attempt to cache the DetailPanel
diff https://github.com/philstrong/citybars/commit/a77647b452db1c405777f616ad8269ff9866fcd1#app/controller/Business.js

Also attached the designer archive

12 Mar 2012, 5:31 PM
@zmagyar (http://www.sencha.com/forum/member.php?389308-zmagyar) sorry I meant autodestroy to false.

But...I am looking at Phil's posting after mine, I am really glad some one in Sencha team looked into it and ran into same problem. I am going to try out Phil's suggestion and post back on this thread. I feel a lot comfortable now.

12 Mar 2012, 5:51 PM
well...first :

navigation.view is working fine if you create the child view every time. It was behaving the same way with autoDestroy set to false. I'll go with the best practice suggested by Phil.

In ipad safari: (it works fine in chrome)

Unfortunately, when you re-create a view with button component on it, for some reason, button's tap event does not work.

Alternatively, if I try using autoDestory set to false, button component works fine, but its associated audio component does not.

I feel like I am struck after having spent more than 15 hours.

I'd appreciate if you could take a look and let me know how I can fix this problem. You can access the page at www.focusindia.org/sb5/slokas.html (http://www.focusindia.org/sb5/slokas.html) and click the top right image.

From list view click couple of items and try and play the music.


12 Mar 2012, 6:25 PM
hoo..it worked thank fully.

Phil, Thank you for the pointer that setting autoDestroy to false produces erroneous results in child views.

I went with your suggestions and stuck with it. The reason the button in child view does not respond to tap is that - when you press 'back' button in navigation view - not only does it pop the view , when you recreate it, Listeners need to be explicitly added as well.

Once I added the Listeners, it started to work again.

I wish this was communicated in detail when ST2.0 GA was rolled out last week. This has pretty much cost me the last several days and not to talk about the frustration.

But, Phil I Thank you for taking time to respond and
@zmagyar (http://www.sencha.com/forum/member.php?389308-zmagyar) for restarting this thread.
I am ready to move on now.


13 Mar 2012, 8:18 AM
Thanks for the update. Yep, it makes perfect sense to not keep the instance there as in your fix. However the auto destruction seems to be a weird "feature" here. :-)

13 Mar 2012, 9:33 PM
Awesome! I'm glad you worked it out. I suspect autoDestroy: false isn't working as designed.

7 Apr 2012, 11:44 AM
It helped me too.
But I cannot understand one thing. Once I changed to new code from

it slowed down the entire process (on chrome and safari both) . It took a long time to open the panel.
Any idea why?


11 Apr 2012, 10:28 AM
I recently updated the citybars app

it now has
zoom: 18

latitude: lat,
longitude: long

at that line number ... is this what you mean?