On Wed, Apr 15, 2009 at 9:55 AM, Graham Cox wrote:
> It's not illegal, though many will tell you it's not best practice
To elaborate: According to the documentation (and good sense),
-drawRect: should be as quick / lightweight as possible since it could
be called many times in rapid succession
Just as a further note, I wrote this in a quick and dirty project just
yesterday - works fine. Your problem is elsewhere. Suggest you show
the whole of drawRect:?
- (void) drawRect:(NSRect) rect
{
[[NSColor whiteColor] set];
NSRectFill( rect );
[[NSColor
On 15/04/2009, at 11:43 PM, Carlos Eduardo Mello wrote:
I am calling the code below inside drawRect: in my custom view, so I
can draw the string inside the view.
It fails miserably every time.
In what way?
Is it, by any, chance illegal to allocate a string inside drawRect?
It's not ill
On Wed, Apr 15, 2009 at 9:43 AM, Carlos Eduardo Mello
wrote:
> I am calling the code below inside drawRect: in my custom view, so I can
> draw the string inside the view.
> It fails miserably every time. Is it, by any, chance illegal to allocate a
> string inside drawRect?
> Could anyone think of
Hi,
I am calling the code below inside drawRect: in my custom view, so I
can draw the string inside the view.
It fails miserably every time. Is it, by any, chance illegal to
allocate a string inside drawRect?
Could anyone think of a reason twhy his call should just refuse to do
its thing?