bug-gnustep
[Top][All Lists]
Advanced

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

Re: [NSButton sendActionOn:]


From: Fred Kiefer
Subject: Re: [NSButton sendActionOn:]
Date: Sat, 29 Jul 2006 13:26:15 +0200
User-agent: Thunderbird 1.5.0.4 (X11/20060527)

I now had a deeper look at that problem and slowly my memories are
coming back. We have been there before. There was some reason to keep
this strange and wrong fiddling with the action mask. It is important
when an action, for example pressing a button, results in a new window
being started. In that case the old code made sure the action was only
send after the window had released the mouse. The problem is that when
we have the mouse still captured while the new window is opened this new
window will never get the focus and wont respond to key presses or mouse
clicks.
This raises the question, if we should not just remove the mouse
capturing itself. This only gets done for NSControl and NSStepper. Other
subclasses of NSControl, NSMatrix or NSTableView for example don't use
it. I removed it for a try and things still seem to work. But there may
be some special cases, where we really need to have the mouse captured
to catch the event when the mouse goes up in a different window. I am
not sure about this and would like to hear other opinions on this issue.

As I will be away for the next two weeks, I wont submit my current
change as it may break things for somebody and I wont be able to fix it
fast.

Cheers
Fred

Fred Kiefer schrieb:
> Hi Marc,
> 
> I always thought that these lines are wrong, but as nobody did complain
> I left them in. They have been in the GNUstep code for quite some time now.
> What is the example that is failing you? And an even better question,
> why didn't you report it on Savannah in the web interface? :-)
> I will change it anyway, as this is the missing bit of a clean up I
> started on the 19th of March, 2003.
> 
> Cheers
> Fred
> 
> Marc Brünink schrieb:
>> Hi all,
>>
>> [NSButton sendActionOn:] does not work at all. This is because of
>>
>>   if ([_cell isContinuous])
>>     {
>>       oldActionMask = [_cell sendActionOn: NSPeriodicMask];
>>     }
>>   else
>>     {
>>       oldActionMask = [_cell sendActionOn: 0];
>>     }
>>
>> in [NSControl mouseDown:]. If I comment these lines out and kill the
>> last 3 lines of the method
>>   //[_cell sendActionOn: oldActionMask];
>>
>> //  if (mouseUp)
>>   //  [self sendAction: [self action] to: [self target]];
>>
>> everything works as expected. Why does NSControl just ignore my settings
>> and resets everything back to 0 before handling the event?
>>
>> Please send me a CC.





reply via email to

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