[Dev] "controls as buttons" ticket

Eric Lemoine eric.lemoine at camptocamp.com
Sat May 30 09:08:20 CEST 2009


Hi

Thanks Tim for your comments in #67.

Sorry for not replying in the ticket, I'm having trouble logging into  
Trac right now.

So my initial idea with the fromControl was: the user provides a  
control and a thing that can be added to a toolbar or a menu (a  
button, a menu item or an Ext action) and gets a new thing that can be  
added to a toolbar or a menu, with a control wrapped into it. With the  
fromControl function the user does not even need to know that the  
"thing" the func returns is a GeoExt.Action, GeoExt.Action is a GeoExt  
internal thing, a convenient way for us to wrap controls in buttons,  
menu items and Ext Actions.

Now I agree that this pattern isn't one that Ext uses, and I agree  
that we should stick to Ext patterns not to confuse people. So I think  
I'm ok with dropping the fromControl adapter. And the fact that the  
fromControl cannot receive another GeoExt.Action is another reason for  
dropping it.

I really like having the GeoExt.Action adding the control to the map  
if the map instance is in the config.

So Tim, if you agree and think it's ok not hide GeoExt.Action to the  
standard user, I'll remove the fromControl adapter and commit your  
patch.

Thanks,

--
Eric



More information about the Dev mailing list