At Sun, 13 Jan 2013 13:50:52 -0700, Danny Yoo wrote:
> > You may want to use `ffi/unsafe/nsalloc'.
> 
> Ok, I see now.
> 
> 
> As a followup: I've found that I need to have this (or require
> ffi/unsafe/nsalloc, which provides this):
> 
>     (define cocoa-lib (ffi-lib (format
> "/System/Library/Frameworks/Cocoa.framework/Cocoa")))
> 
> before calling into import-class with those Cocoa classes.
> 
> I had assumed that I'd be able to poke around the Cocoa classes
> without having to dynamically load the Cocoa library, so that's where
> I went wrong.  Requiring 'ffi/unsafe/nsalloc' also does the
> prerequisite library-loading work.
> 
> 
> Is it ok to add a little margin note to the docs on import-class to
> provide this warning?

Good idea. I think it fits better inline, though, so I've added a note
that way.

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to