Re: Unexpected mouse-handling behaviour
Re: Unexpected mouse-handling behaviour
- Subject: Re: Unexpected mouse-handling behaviour
- From: Manuel Meyer <email@hidden>
- Date: Mon, 23 Feb 2009 14:45:56 +0100
Hmm, the endPoint and startingPoint are just helpers right now to
visualize the mouse interaction. I haven't done any coding on the
vertices between two Nodes yet.
I wanted to connect the Nodes without using the superview, but maybe I
have to? What is the best way to find out, what View(s) are located at
a certain point?
If u want to have a look: here is my coplete project code
http://gonzo.uni-weimar.de/~meyer4/SlipMaster.zip (175KB)
I'm not sure there is a problem. If the clicked NodeView is
receiving all the rightMouseDragged: messages, even when the mouse
leaves the view, it would be consistent for it to receive the
rightMouseUp: message as well. Note that at the time the user
releases the mouse, it might not be over any view, so it makes sense
for the initially clicked view to handle all the events for the
entire drag sequence.
If the start node and end node are guaranteed to have the same
VSGraphView as their superview, it seems to me your code should
still work, since that superview will still get the setEndPoint
message.
--Andy
On Feb 22, 2009, at 9:21 AM, Manuel Meyer wrote:
Hey,
I just started to learn obj-c/Cocoa. As my first application I am
writing a networkgraph-editor. Each node got it own view.
To connect to nodes, I thought of using rightMouseDown,
rightMouseDragged and rightMouseUp.
So the NodeView, where a rightMouseDown event is triggered will be
the starting-node for the connection and those NodeView, where the
rightMouseUp event is triggered, will be the end-node.
rightMouseDragged is used to show a line as visual feedback.
But I got another behaviour: the rightMouseUp-event will allways be
triggered on the first node, no matter if the mouse was moved to
another or to no NodeView.
What is my mistake?
Here is my code: http://paste.lisp.org/display/75958
Thanks for your help,
Manuel
_______________________________________________
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
aglee
_______________________________________________
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