Skip navigation.
 
mlNSRect/NSButton bug?
FROM : Colin Cornaby
DATE : Sun Nov 24 12:23:39 2002

Hello, I am trying to set the NSRect of a NSButton but I've run into
what looks like a bug (or a "feature").

In IB (using bottom, left) the button has a y co-ord of 24. Until you
change the co-ord [authtext frame].origin.y will nicely read it as 24.

Here is where it gets freaky. If I set the y co-ord to 24, the button
will actually move up 4 pixels on screen. If I set the y co-ord to 20
the button will stay put. When I set it to 20 [authtext frame].origin.y
will begin reading it as 20 even though it was at 24 before and the
button did not physically move.

This means if I run the code [authtext setFrame:NSMakeRect(49,[authtext
frame].origin.y,i,21)] the buttons y co-ord will actually move even
though I am setting the y co-ord to itself!

Is there any explanation for this?

---------------------------------------
Colin Cornaby
Official Cocoa Newbie for RBDeveloper Magazine
Head Person, Conundrum Software, www.conundrumsoft.com


Related mailsAuthorDate
mlNSRect/NSButton bug? Colin Cornaby Nov 24, 12:23
mlRe: NSRect/NSButton bug? j o a r Nov 24, 14:56
mlRe: NSRect/NSButton bug? Colin Cornaby Nov 24, 15:20
mlRe: NSRect/NSButton bug? j o a r Nov 24, 22:27