Cool, thanks.
And now doing this using the new 'control' option in containers to have all listeners together.

Anyway, I'm designing this new app following the principle of only having action methods in the controller and listeners in the views using control.
The only blocker is setting listeners for the container itself via control, but should be overridable.
Will look into it as soon as I really need it.

I wonder if that's the best approach though. Does relaying the 'tap' event to the controller by re-firing it from the element listener instead of handling it there and then incur a discernable delay on 'less modern' devices ?

there must be a better way

there must be a better way

mbarrot, any further discoveries on this topic?

The action handlers with parameters do indeed belong in the controller, but must events really be re-fired from the view in this way in order to have the parameters pass through to the controller? The "Refs and Control" docs concerning controllers have no example listeners that check which sub-item was tapped.

Well, I agree that in most cases, the event handler code belongs in a controller. Makes for a much cleaner architecture and more maintainable code this way.

As I start to grasp Sencha Touch better, I seem to understand that 'tap' is a framework 'element' level event, where as the 'control' property of the controller only traps framework 'component' level events - I may be wrong - Robert orMitchell, please correct me.

If such is the case, it does make sense to trap the event at element level, shift the scope to the component itself and refire it for the controller to catch:

If you mean a component embedded in the container, you should first reference it using ComponentQuery (this.query or this.down) in your container's initializing code, then use the 'on' property of its element to specify the event handler.

Whether you want to handle the event in the controller at the container level (me.fireEvent) or at the inner component level (someItem.fireEvent) is debatable.

As for performance issues of the component direct listener vs controller handling approach, I've run both codes on an iPhone 3GS and found both reasonably slow compared to a newer device :-) Slow enough not to notice any difference between the two. On an iPhone 4S, they are both pretty responsive, again, no real difference. I haven't any Android devices handy at the moment though...