• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?


  • Subject: Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?
  • From: Graham Cox <email@hidden>
  • Date: Tue, 18 Aug 2009 12:32:27 +1000


On 18/08/2009, at 2:27 AM, Corbin Dunn wrote:

It seems strange to me that this method is doing highlighting duty when all it's meant for is to return a property.

To me, it doesn't seem strange. It is AppKit that displays the menu, and it allows a consistent user interface to be used throughout, and we wanted to work easily and without trouble to the developer.


Just to add a further comment on this.

It seems strange because on the face of it -menuForEvent: is meant, as far as I can see, merely to return a property - the view's contextual menu (the event providing the context). What is done with the menu as far as displaying it, is down to the client code that invokes this. (Though what it would do other than pop it up and track it, I couldn't say).

It is surely not meant to implement behaviours such as visual feedback (is this done here by any other class?). Wouldn't it be more appropriate to be doing the visual feedback part in -rightMouseDown: ? It strikes me that it would be a lot easier as well as more correct to do it there, since you have a single place to both turn on the highlight and turn it off when menu tracking finishes. You must be going out of your way to flag that the row will need an update when tracking ends to clear the highlight, since once -menuForEvent: returns it doesn't get called again when the menu tracking completes.

This is only conjecture of course as I don't have the source available to me, and there may be good reasons for not overriding - rightMouseDown: to handle this that I'm not able to think of (accessibility??), but currently it's looking like a slightly strange design in terms of where the responsibility for the highlight properly lies.

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?
      • From: "I. Savant" <email@hidden>
References: 
 >Turn off menu highlight in outline view? (From: Graham Cox <email@hidden>)
 >[SOLVED, with reservations] Re: Turn off menu highlight in outline view? (From: Graham Cox <email@hidden>)
 >Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view? (From: Corbin Dunn <email@hidden>)

  • Prev by Date: Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?
  • Next by Date: Read last x bytes of a text file?
  • Previous by thread: Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?
  • Next by thread: Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?
  • Index(es):
    • Date
    • Thread