Link To Controller Is Gone After View Is Removed/Destroyed In Sencha Touch

This is a pretty common problem among newbies of Sencha Touch and I am sure that in your controller class, you used the component’s id to get a reference to it.

True, that way works but once the view is removed or hidden and destroyed, the link between the view and controller also is lost.

In my case, I overrode the initialize method of the view. Once I removed it and re-added it to the viewport, the function did not run anymore.

The culprit is due to the fact that I used the view’s id to get a reference to it.

To avoid this problem, it is best to use the xtype path to the component you want to get a reference of.

See this code as an example.
panel[id=myview] toolbar button[id=mybutton]

This means that the controller gets a reference to an Ext.tab.Panel class that contains an Ext.Toolbar with an Ext.Button in it with id mybutton. This is much better than just using id because it is more specific considering that you specified the exact path to the component.

Donations appreciated. Every little $ helps. Or click Google +1. Or play the short video on the upper right of this page.

Shirt Features Built-In iPod Controller

Here is a unique gadget to let iPodf users have control of their device through the use of their shirt. Urban Tool created grooveRider, a shirt for both men and women that lets you operate your iPod directly through a technology called Smart Fabric, a unique interface on the front of your shirt.

Just stick your iPod into the shirt and plug in your headphones and you are off to wherever you want to go. Control the volume, skip, play or stop songs all with your shirt. This shirt is currently available only in Europe for EUR 59 or $80.

While this seems to be a good invention, I can’t help but think how you will clean up the shirt after using it. Can’t let the sweat just idle in there right? ;)

Donations appreciated. Every little $ helps. Or click Google +1. Or play the short video on the upper right of this page.

Game Controller For iPhone And iTouch

gamepadAs if the iPhone and iTouch units are not enough, ZodTTD, the creator of all those emulator games of past years now ported to Apple’s famous gadgets, has been working on a game control pad that can be hooked to the iPhone enabling us to freely play the emulator games without the worries of cramped space on the iPhone screen. They also are going to make one for the iTouch so this is quite big news for people who enjoy playing those old games from other consoles.

Remember though, that if this game controller were to become public for commercial use, this would only work for the emulator games. Although there is no official word on anything regarding game controllers for the iTouch, I do hope that soon, these would become a reality. It would make playing the games a lot easier on our part especially if touching buttons on the screen is required. Until then, keep your fingers crossed.

Donations appreciated. Every little $ helps. Or click Google +1. Or play the short video on the upper right of this page.

Related Posts Plugin for WordPress, Blogger...