[racket] Does the ffi/unsafe/objc require racket/gui/base to do things?

From: Danny Yoo (dyoo at hashcollision.org)
Date: Sun Jan 13 15:50:52 EST 2013

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

Posted on the users mailing list.