> 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?


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

Reply via email to