gnustep-dev
[Top][All Lists]
Advanced

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

Re: Strange behaviour on cells


From: Adam Fedor
Subject: Re: Strange behaviour on cells
Date: Thu, 20 Feb 2003 21:49:36 -0700
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.1) Gecko/20020905



Benhur Stein wrote:

Hi!

While trying to understand the implementation of NSMatrix, I came to
some behaviour of NSCell and NSButtonCell that seems to be wrong.
Can anybody with more knowledge (or access to OS or OSX) verify this?

- A radio button shows its state by using an alternate image (the one
  where it is selected) when it is in the ON state. It uses the same
  image to show when it is highlighted, even if it's state is OFF.
  The problem is, when it is both highlighted and ON, it shown it's
  normal image (the one where it is not selected), and that seems
  plain wrong to me.

Isn't highlighting used to show what will happen if you let up on the mouse? In that case it seems like that is the correct behavior to me. Perhaps I'm missing something, though.


- At the end of the tracking of the mouse, if the button went up
  within the cell, NSCell changes its state (calling setNextState)
  before sending the action. Shouldn't this be the responsibility of
  the NSControl controlling it? (or at least of a subclass implementing
  stopTracking:at:inView:mouseIsUp:, as is the example of apple's
  documentation in


Yes. It seems like, from the documentation, the control is supposed to change the state and send the action.


http://developer.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSCell.html#BBCDFCEJ

The problem with changing the second behaviour is that probably some things will stop working. I'm changing the code to track the mouse in NSMatrix, and it relies on this behaviour. I'll simplify it and make
it work with both behaviours, but it could be further simplified if
cells behaved differently.


Yes, it could get complicated. I'd do it though if it seems right. After I make the pre-release, we'll have plenty of time to fix bugs :-)






reply via email to

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