Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

CPToolbarItem setEnabled:NO does not disable the toolbar item

#97

calling setEnabled:NO appears to have no effect on the CPToolbarItem. It should cause the toolbar item to be rendered as disabled (or semi-opaque) and should prevent the toolbar item's selector from being called.

Reported by Jake MacMullin · October 8th, 2008 @ 01:40 PM

State: new
Milestone: none
Assigned to: nobody

Activity

  1. Jake MacMullin
    Jake MacMullin

    I've had a bit of a look at the code and am wondering if the 'reloadToolbarItems' method in _CPToolbarView is the place to check for 'isEnabled'. The code here seems to be creating views for each of the toolbar items and assigning targets and actions etc - perhaps this should be modified to check for 'isEnabled'?

    Is this the right place to do this?

    How often is this method called? (i.e. is it likely to be called again if I change the state of a toolbar item to disable it). I'll dig around a little more tomorrow.

    October 8th, 2008 @ 08:22 PM

  2. ronin-756 (at lighthouseapp)
    ronin-756 (at lighthouseapp)
    • Tag set to @needtest

    Thanks for your bug report. Do you think you could provide us with sample code that illustrates this bug? You could upload a sample AppController.j here or more simply paste it on http://gist.github.com and link it here. It would definitely help to solve it quickly.

    March 23rd, 2009 @ 09:40 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.