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.

CPToolbaritems don't alternate their icon when pressing label

#87

The 'normal' behavior of a Cocoa/Mac toolbar when clicking a toolbar item on it's label is to alternate the corresponding icon/image, giving feedback to the user. This does not happen yet in Cappuccino.

I have quickly glanced over the code of CPToolbarItem and saw that both the view (the image) and the label are both set to the same target and action. Resulting in the image not 'seeing' the label being pushed.

a strategy could be to wrap the target and action call and within the wrapper make sure to also 'press' the image when only the label is clicked.

Reported by Redmar · October 3rd, 2008 @ 12:06 PM

State: new
Milestone: none
Assigned to: Francisco Tolmasky Francisco Tolmasky

Activity

  1. Stephan Eggermont
    Stephan Eggermont
    • Assigned user cleared.

    Invalid.

    Take a look at the flickr demo

    October 3rd, 2008 @ 10:33 PM

  2. Redmar
    Redmar

    I've looked at the flickr demo, 280slides and at the behavior of the Cocoa toolbar in Pages and other Apple apps.

    When you only click on the label of an CPToolbarItem, you don't see any feedback in the form of the image button going down as if being pressed.

    You can even see in the cocotron sources that their implementation of the toolbar behaves exactly the way as in cocoa. (i.e. with the feedback on the image/icon)

    So i don't know why you give me such a short description and redirecting me to the flickr demo. Could you elaborate on this?

    (tested under FF and Safari)

    October 4th, 2008 @ 01:02 AM

  3. Stephan Eggermont
    Stephan Eggermont

    Sorry, clicking on the label doesn't show the alternate image. It doen't have anything to do with the target and action though, which should be the same.

    October 6th, 2008 @ 06:14 AM

  4. Redmar
    Redmar
    • Assigned user set to Francisco Tolmasky

    It doen't have anything to do with the target and action though, which should be the same.

    It does. Implementation wise. ATM the internals of a toolbaritem are that they contain two duplicate targets and actions but on the outer side, the interface, it only has one target and action.

    But by internally using 2 pairs of target/actions you can never capture in the image if the label is pressed because it just fires it's own target and action.

    October 6th, 2008 @ 06:24 AM

  5. 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:43 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.