Hi Dave,
I see. If this pattern is used inside the Apple Sketch sample (so, in source
code you control and not in a framework), then indeed passing a unique Pointer
instance should do the trick.
There are probably better ways to do what you want without using the context
argument, once you are
Hi Laurent,
I am converting the Apple Sketch sample app to macruby and this construct is
used everywhere. My understanding (maybe faulty) is all they are trying to do
is generate a unique pointer - pointing at a unique static string should do
this, and by assigning it to a constant will show u
Hi Dave,
Sorry for the late reply.
I'm afraid it's not currently possible to pass a string as an API that accepts
a 'void *' (which seems to be your case). If you file a ticket on the tracker
we can address this problem.
Your Pointer.new call may not raise a runtime exception but I suspect it'
Digging a bit more I think a solution to my own questions is:
On 13 May 2010, at 14:33, Dave Baldwin wrote:
> I am trying to translate code that looks like this:
>
> static NSString *SKTWindowControllerCanvasSizeObservationContext =
> @"com.apple.SKTWindowController.canvasSize";
>
> and later