Design Element
Comment on "THCanvasView 1.0.1 and PhotoStacks Sample App"
by Blain — Oct 16
Yes, although it's not completely clear to me what the content should be. It seems that's usually application-specific?

As it's a NSView subclass, wouldn't it already have a menu outlet? And you could always subclass THCanvasView and override -menuForEvent:. But all the cool kids use delegates.

- (NSMenu *)menuForEvent:(NSEvent *)theEvent; { if ((_delegate != nil) && ([_delegate respondsToSelector:@selector(canvasView:menuForEvent:)]) { return [_delegate canvasView: self menuForEvent: theEvent]; } return [super menuForEvent:theEvent]; }

Adding delegate accessors is left as an exercise to the reader.
Back to "THCanvasView 1.0.1 and PhotoStacks Sample App"
Design Element

Copyright © Scott Stevenson 2004-2015