• 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: How to draw a rectangle around a (graph) view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to draw a rectangle around a (graph) view?


  • Subject: Re: How to draw a rectangle around a (graph) view?
  • From: "Arthur C." <email@hidden>
  • Date: Tue, 29 May 2007 23:19:20 +0200


From: Uli Kusterer <email@hidden>
To: I. Savant <email@hidden>
CC: "Arthur C." <email@hidden>, email@hidden
Subject: Re: How to draw a rectangle around a (graph) view?
Date: Sun, 27 May 2007 15:43:13 +0200


On 24.05.2007, at 23:16, I. Savant wrote:

On 5/24/07, Arthur C. <email@hidden> wrote:
This works OK, except for the case of a mouseclick inside the app window but
not inside one of the graph views. In this case the selected views should be
deselected, but how do I know when the mouseclick happens? It happens
outside the graph views so it should be handled outside of the graphview
code, right?

Why not forward the event along to your graph views, converting coordinates as necessary?

I think a cleaner solution would be to just embed all the views in a "background view" that implements mouseDown: and on a click loops over its subviews, telling them to unselect.

Okay, but then you have to introduce a new NSView subclass... and how does the responder chain work? Is the mouseclick only handled when it is outside the graph (sub) views? If not, you need a lot of additional bookkeeping to determine what to do in all the cases...


I tried something like [[[self window] contentView] setNextResponder: self], but that resulted in a circular loop. I was hoping for a simple solution, but if there is nothing else the background view looks like the best option.


Thanks,

Arthur C.


Cheers,
-- M. Uli Kusterer
http://www.zathras.de




_________________________________________________________________
Talk with your online friends with Messenger http://www.join.msn.com/messenger/overview


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: How to draw a rectangle around a (graph) view?
      • From: "I. Savant" <email@hidden>
    • Re: How to draw a rectangle around a (graph) view?
      • From: Uli Kusterer <email@hidden>
References: 
 >Re: How to draw a rectangle around a (graph) view? (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: NSArray lookup, pointer comparison
  • Next by Date: Pasteboard issue
  • Previous by thread: Re: How to draw a rectangle around a (graph) view?
  • Next by thread: Re: How to draw a rectangle around a (graph) view?
  • Index(es):
    • Date
    • Thread