Re: drawing into a hidden view
Re: drawing into a hidden view
- Subject: Re: drawing into a hidden view
- From: Kyle Sluder <email@hidden>
- Date: Sat, 15 May 2010 20:12:38 -0700
On Sat, May 15, 2010 at 6:51 PM, Shane
<email@hidden> wrote:
> But I have. My drawRect: is simply as follows.
>
> - (void) drawRect:(NSRect) rect
> {
> NSRect bounds = [self bounds];
>
> [[NSColor blackColor] setFill];
> [NSBezierPath fillRect:bounds];
>
> [self drawAxes];
> [self drawError];
>
> return;
> }
>
Okay, so then I don't understand why being offscreen is a problem.
Unless you're for some reason expecting -drawRect: to be called when
the view is offscreen? That's not gonna happen; you need to be drawing
somewhere (screen, printing operation, offscreen window) in order for
-drawRect: to get called.
Once you bring the view back onscreen, -drawRect: will get called and
it should draw your data. Maybe you have a logic error that prevents
recording data under the same circumstances in which that view is
offscreen?
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden