[Openmcl-devel] Questions about #? to access variables

Anders Conradi beque at telia.com
Sun Jun 13 15:01:45 PDT 2004


Hi,

I have some questions about the #? reader macro to access foreign 
variables.

I have a file containing the following:
--------8<--------
(require :cocoa)
(defvar ha #?NSToolbarSeparatorItemIdentifier)
--------8<--------

If I try to compile that file with compile-file I get the following 
error:

? (compile-file "testar.lisp")
 > Error in process listener(1): Can't dump #<A Mac Pointer #xA30725D4> 
- unknown type
 > While executing: CCL::FASL-UNKNOWN
 > Type :POP to abort.
Type :? for other options.

Why? What should I do to get it to work?


Another question. If I type:
? (require :cocoa)
? #?NSToolbarSeparatorItemIdentifier

I get an unrecognized macptr:

#<A Mac Pointer #xA3085D60>

  Why isn't it recognized as an objc-object? If I do

? (%get-ptr #?NSToolbarSeparatorItemIdentifier)

I get #<OBJC:OBJC-CLASS NS:NS-CF-STRING (#xA0130D40)>

Is this some class that isn't known by the bridge, and in that case why 
not?

// Anders




More information about the Openmcl-devel mailing list