Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

the ev

macrumors newbie
Original poster
Jun 14, 2008
9
0
How does one do it?

Code:
myNSRect.origin.x = (float) moveToNewXCoordinate;

...never seems to work. :(
 

kpua

macrumors 6502
Jul 25, 2006
294
0
Your question is too vague. What do you mean by "doesn't work"? There shouldn't be anything wrong with the assignment (verify with an NSLog() + NSStringFromRect() before and after).
 

the ev

macrumors newbie
Original poster
Jun 14, 2008
9
0
Your question is too vague. What do you mean by "doesn't work"? There shouldn't be anything wrong with the assignment (verify with an NSLog() + NSStringFromRect() before and after).

My apologies about the vagueness. After reviewing the NSLog(NSStringFromRect(myNSRect)); messages I determined that I was, indeed, moving the NSRect, which then lead me to realize that my problem was resetting the frame of my other element (the frame of which I used for the basis of my NSRect), which I wasn't doing.

Code:
[self setFrame: myNSRect]

That was the piece I was missing. Thanks for the heads-up on the NSStringFromRect() method...and your patience! (If you couldn't tell, I'm still a newbie at all of this). :rolleyes:
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.