Re: Question about Apple's updated Sketch-112 program
Re: Question about Apple's updated Sketch-112 program
- Subject: Re: Question about Apple's updated Sketch-112 program
- From: Graham Cox <email@hidden>
- Date: Thu, 15 Oct 2009 09:42:15 +1100
On 15/10/2009, at 12:44 AM, Michael de Haan wrote:
- (void)invalidateGraphic:(SKTGraphic *)graphic {
NSArray *windowControllers = [self windowControllers];
[windowControllers makeObjectsPerformSelector:@selector
(invalidateGraphic:) withObject:graphic];}
I **think** I see what each line is doing, but, fail to grasp the
overall essence of the call.
When a graphic is inserted into the data model, the view that displays
it must be updated so that it gets drawn. Since there can be multiple
window controllers each having one or more views of the data model,
this call ensures that they all get the message. I haven't checked but
I suspect if you follow the trail of where -invalidateGraphic: goes,
it ends up calling -setNeedsDisplayInRect: on a view somewhere.
--Graham
_______________________________________________
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