[Users] Adding a menu item to an existing Tbar, not working
Eric Lemoine
eric.lemoine at camptocamp.com
Thu Oct 7 18:23:41 CEST 2010
On Thursday, October 7, 2010, Eric Lemoine <eric.lemoine at camptocamp.com> wrote:
> On Wed, Oct 6, 2010 at 4:44 PM, Andrew Stewart
> <Andrew.Stewart at reddeer.ca> wrote:
>> Ah ok I think I had this backwards, I modified the example and I removed draw line/draw polyline from the bar and the menu still worked. However if I remove the other controls from the menu and leave only the polyline/line then I get the same result, the actions on the toolbar now don't toggle the actions on the menu even though they belong to the same togglegroup/group. So do I have to keep the actions from the toolbar inside the menu also for this to work? Below is my code of the modified example.
>
> I could reproduce the problem, and it looks like a bug in GeoExt.
Actually no, it is not a bug in GeoExt. Toggle groups do not work
across classes, because buttons and menu items aren't registered to
the same toggle manager.
So you need to handle this at the application level, by defining
toggleHandler and checkHandler functions in the action options and
have them take appropriate action.
Cheers,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
More information about the Users
mailing list