#87 new
Redmar

CPToolbaritems don't alternate their icon when pressing label

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

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.

Comments and changes to this ticket

  • Stephan Eggermont

    Stephan Eggermont October 3rd, 2008 @ 10:33 PM

    • Assigned user cleared.

    Invalid.

    Take a look at the flickr demo

  • Redmar

    Redmar October 4th, 2008 @ 01:02 AM

    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)

  • Stephan Eggermont

    Stephan Eggermont October 6th, 2008 @ 06:14 AM

    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.

  • Redmar

    Redmar October 6th, 2008 @ 06:24 AM

    • 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.

  • ronin-756 (at lighthouseapp)

    ronin-756 (at lighthouseapp) March 23rd, 2009 @ 09:43 PM

    • 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.

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Cappuccino Web Framework, including AppKit, Foundation, and Objective-J.

Shared Ticket Bins

Tags

Pages