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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to