gnustep-dev
[Top][All Lists]
Advanced

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

Re: Change on NSControl


From: Quentin Mathé
Subject: Re: Change on NSControl
Date: Mon, 24 May 2004 20:27:14 +0200

Le 24 mai 04, à 16:47, Fred Kiefer a écrit :

Hi Quentin,

Hi Fred

could you please explain the change you made to the mousedown: method on NSControl? The change here looked rather strange to me, as the only super implementation for mouseDown: I could find was in NSResponder. So I searched around a bit more and found that extension of NSView in the GSToolbar.m file. This code structure isn't obvious, at least not to me. Perhaps you could write some comments on the toolbar validation to the mailing list and add them later on to the files, so this information wont get lost.

My idea was to be able to know when each view receives a mouse down event, the only solution not too ugly (without changing NSView code) I have found is to override the NSView -mouseDown: method with a category. I need to receive any mouse down events in a window (which has a toolbar) to trigger each time the toolbar validation process. I have taken a more attentive look at the code and now I see there is a problem because NSResponder implements -mouseDown: to handle the responder chain, then I must find another solution which doesn't trigger always the NSResponder -mouseDown: code.
Well I will revert NSControl to the previous version.
… but I'm curious to know if you have a nice solution to solve this issue.

I will write probably another mail to explain the toolbar validation mechanism more in detail.

Your change to the tracking rect handling may be obvious to you, but again it isn't to me.

I discussed this changes with Alex M. which want to apply a patch with similar changes (but more extensive) to support -gui handled window decorations. The idea is to be able to propagate the events starting from the root view (_wv variable) because with a title bar view, the content view will not be anymore the only one root view child. For the toolbar implementation, the problem is similar because the content view can be changed without way to be notified (in such case, we would loose the tracking rect which has been set on it). To handle the toolbar validation, a tracking rect needs to be set in order to know when the mouse enters and exits the toolbar window.

The problem here is that if we don't document what is the intention, somebody else may break it later on, as they just don't know about it.

ok, sorry. I have been a bit fast to commit.

BTW: There are also a few compiler warnings from toolbar related classes. Could you please fix them.

I will fix them soon.

Quentin.

--
Quentin Mathé
address@hidden




reply via email to

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