[Openmcl-devel] More confusion about cocoa constants
Neil Baylis
neil.baylis at gmail.com
Fri Jul 10 09:47:54 PDT 2009
In addition to the problem I previously mentioned re #
$kCAGravityCenter at compile time, I'm running into other difficulties
with constants. Is there something more I need to do other than
loading the framework?
This is a session from the IDE listener window:
Welcome to Clozure Common Lisp Version 1.4-dev-r12363M-trunk
(DarwinX8664)!
CL-USER> (objc:load-framework "QuartzCore" :quartzcore)
NIL
CL-USER> #$kCAGravityCenter
> Error: Constant not found: X86-DARWIN64::|kCAGravityCenter|
> While executing: CCL::LOAD-OS-CONSTANT, in process Listener(6).
> Type cmd-. to abort, cmd-\ for a list of available restarts.
> Type :? for other options.
CL-USER> #&kCAGravityCenter
#<NS-MUTABLE-STRING "center" (#x7FFF704F3AC0)>
CL-USER> #$kCAConstraintMidx
> Error: Constant not found: X86-DARWIN64::|kCAConstraintMidx|
> While executing: CCL::LOAD-OS-CONSTANT, in process Listener(6).
> Type cmd-. to abort, cmd-\ for a list of available restarts.
> Type :? for other options.
CL-USER> #&kCAConstraintMidx
> Error: Foreign variable "kCAConstraintMidx" not found
> While executing: CCL::%LOAD-VAR, in process Listener(6).
> Type cmd-. to abort, cmd-\ for a list of available restarts.
> Type :? for other options.
CL-USER> #$NSBackingStoreBuffered
2
CL-USER>
It's very confusing trying to find the correct syntax for init forms.
How do I know beforehand whether to use the #$ or #& prefix for a
constant? It seems very unintuitive. Why is kCAGravityCenter defined,
but kCAConstraintMidx is not, when they are both from the same
framework? (They are defined in different header files).
Neil
More information about the Openmcl-devel
mailing list