View Full Version : Dialog buttons

11 Dec 2006, 9:54 AM

I was looking at the lasted svn code and your refactoring of BasicDialog and the buttons. It made me to think to go back and look at some of my code. At one point I overrode addButton to build the buttons array as a MixedCollection rather than simple array, so I could then build
showButtons(), hideButtons() which use 'each' to do their thing. It's not a big deal for me to tweak my version to account for your latest, but maybe it's something to incorporate into the base.

Rather than use MixedCollection, maybe it's better to use CompositeElement. That way you wouldn't have to add indivdual methods to operate on the collection (e.g showButtons). You could just access a buttons property to get the CE and call show, hide, disable, etc.