[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Strange behaviour on cells
From: |
Benhur Stein |
Subject: |
Strange behaviour on cells |
Date: |
Wed, 19 Feb 2003 12:58:29 -0300 |
User-agent: |
Internet Messaging Program (IMP) 3.0 |
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.
- 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
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.
Benhur
- Strange behaviour on cells,
Benhur Stein <=