discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compound views and hitTest:


From: Nicola Pero
Subject: Re: Compound views and hitTest:
Date: Thu, 14 Feb 2002 18:33:12 +0000 (GMT)

> Hi,
> 
> While working with gorm, I noticed, that when you are connecting to a views
> such as NSBrowser, NSScrollView(with NSTextView) or a NSTableView, you can
> connect to any subview (NSScroller, NSTableHeaderView,...) of that view. I
> would expect connection to that compound view.
> 
> I think, that this should be handled in hitTest: method, that should be
> overridden in NSTableView, NSBrowser... to return 'self' and not to look
> through subviews.
> 
> Or, is current behavior right?

I don't know about Gorm, but the current behaviour of hitTest: is right -
hitTest: is used when you do a mouse down on a window, to determine the
view which should manage the mouse down.

If we override hitTest: in NSBrowser etc, then clicking with the mouse
inside a NSBrowser wouldn't work any longer (eg, if you click on a browser
scrollbar, you want the scrollbar to get the mouse down! not the browser).

That for the part I know of.

If gorm is using hitTest: to determine the view to connect to, and if this
is not the correct behaviour (I don't know), then it's gorm which needs
fixing :-) probably if the view returned by hitTest: is not one of the
objects managed by Gorm, Gorm should go up to the superview, and to the
superview's superview etc till it gets to a view which is managed by Gorm,
and then connect to that one.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]