Click here for decent coding practices when using ExtJS or Sencha Touch, in this case.

But there are times when I want to use ownerCt. I've got a Toolbar on a TabPanel of GridPanels that needs to, surprise, access the Store of the active GridPanel to get some information. I need to instantiate the Toolbar before the TabPanel if I want to set it as its tbar, but if I can't use ownerCt to drill back up and over from the Toolbar's Button's event handler, then the Toolbar anachronistically needs a reference to its unofficial "parent" when it's created.

Get it?

So sure, there are unclean ways around this, and I'm about to pick one. But if I could use ownerCt, I would be in business already.

Why not use ownerCt? Not just because it's "good advice", above, but because...

toolbars in the current version [ExtJS 2.2 in this case] aren't implemented as containers. I believe this is planned in 3.0

I love legacy codebases.

Labels: ,