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

Blakeasd

macrumors 6502a
Original poster
Dec 29, 2009
643
0
Hello
I am recreating the look of Apple's calculator app. I am using a method called
NSDrawNinePartImage()
I am trying to draw inside the text fields cell, so I created a rect called
bounds It looks like this:
Code:
NSRect bounds = [self bounds];

This is inside a NSTextFieldCell's drawRect: method. I get an error however saying method bounds not found. Why am I getting this error. Can I not get bounds in a NSTextFieldCell?
Thanks
 
Hello
I am recreating the look of Apple's calculator app. I am using a method called
NSDrawNinePartImage()
I am trying to draw inside the text fields cell, so I created a rect called
bounds It looks like this:
Code:
NSRect bounds = [self bounds];

This is inside a NSTextFieldCell's drawRect: method. I get an error however saying method bounds not found. Why am I getting this error. Can I not get bounds in a NSTextFieldCell?
Thanks

Try the docs. IIRC, NSView subclasses have bounds, NSCell subclasses do not.

Note that this might be an ideal situation to use a NSMatrix, you might check those out.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.