Disabling Toolbar Buttons

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Disabling Toolbar Buttons

Jeffrey Odell-2
I overrode #queryCommand: to enable/disable menus on my browser.  Now I have
a toolbar that also needs to enable/disable toolbar buttons.  How is this
accomplished?

Thanks -

jlo


Reply | Threaded
Open this post in threaded view
|

Re: Disabling Toolbar Buttons

Ian Bartholomew
Jeffrey,

> I overrode #queryCommand: to enable/disable menus on my browser.  Now I
> have a toolbar that also needs to enable/disable toolbar buttons.  How is
> this accomplished?

In exactly the same way, adding the command sent by the toolbar button in
the #queryCommand: method. In Dolphin you enable/disable the command itself
and not the source, menu or button, of the command.

Ian


Reply | Threaded
Open this post in threaded view
|

Re: Disabling Toolbar Buttons

Jeffrey Odell-2
Sorry - for the double posting - my new server is messed up.

Argghh- this is what I thought.  Turns out I made a stupid refactoring error
and was calling super queryCommand more that once in the refactored methods,
which was re-enabling the tool bar items.

A nice feature that it is driven by commands, in that my state is managed in
one place.

Thanks -

jlo

"Ian Bartholomew" <[hidden email]> wrote in message
news:cD0w6.59704$[hidden email]...
> Jeffrey,
>
> > I overrode #queryCommand: to enable/disable menus on my browser.  Now I
> > have a toolbar that also needs to enable/disable toolbar buttons.  How
is
> > this accomplished?
>
> In exactly the same way, adding the command sent by the toolbar button in
> the #queryCommand: method. In Dolphin you enable/disable the command
itself
> and not the source, menu or button, of the command.
>
> Ian
>
>
>
>
>
>