static NSString *SKTWindowControllerCanvasSizeObservationContext = @"com.apple.SKTWindowController.canvasSize";
[[self document] addObserver:self forKeyPath:SKTDocumentCanvasSizeKey options:NSKeyValueObservingOptionNew context:SKTWindowControllerCanvasSizeObservationContext];
SKTWindowControllerCanvasSizeObservationContext = "com.apple.SKTWindowController.canvasSize"
document.addObserver(self, forKeyPath: SKTDocumentCanvasSizeKey,
options: NSKeyValueObservingOptionNew,
context:SKTWindowControllerCanvasSizeObservationContext)
but when it runs I get this error:
expected instance of Pointer, got `"com.apple.SKTWindowController.canvasSize"' (String) (TypeError)
How do I get the a pointer to the context string? All the examples I have found for the Pointer class seem to expect an objective C routing to fill it in.
Thanks,
Dave.