I am trying to translate code that looks like this:
static NSString *SKTWindowControllerCanvasSizeObservationContext =
@"com.apple.SKTWindowController.canvasSize";
and later
[[self document] addObserver:self forKeyPath:SKTDocumentCanvasSizeKey
options:NSKeyValueObservingOptionNew
context:SKTWindowControllerCanvasSizeObservationContext];
to Ruby:
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.
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel