[Openmcl-devel] Building the ApplicationServices framework
Gary Byers
gb at clozure.com
Fri Jun 27 04:50:57 PDT 2008
On Fri, 27 Jun 2008, Didier Verna wrote:
> I wrote:
>
>>> I'm not really sure that that's necessary, since Cocoa.h seems to (via
>>> a twisty maze of #include's, all alike ...) already include
>>> ApplicationServices.h. (I may be mistaken about that, but that's my
>>> recollection.)
>>
>> Hmmm, I had to use things like CGColorGetConstantColor and
>> kCGColorBlack and stuff, but CCL complained it didn't know these things.
>> So I read Apple's dev documentation and figured out it was part of the
>> ApplicationServices framework...
>
> which seems to be confirmed by the fact that I can't find the string
> kCGColorBlack in any of the already existing constants.cdb files,
> contrary to, say, kGenericFolderIcon.
>
> I do see it in vars.cdb files though. What does this mean ?
It means that it's a variable and not a constant.
? #&kCGColorBlack
#<NS-MUTABLE-STRING "kCGColorBlack" (#x7FFF7078FE40)>
In MacOSX, a lot of things that are conceptually constant (immutable)
but whose initial values are objects (either at the CoreFoundation
level or the ObjC level) are variables (and a lot of those objects
are NSStrings/CGStrings.)
You generally don't want to do so, but you can meaningfully assign
values to foreign variables. If the traditional C "errno" was
a simple global variable - it's usually something thread-specific
these days - you could write code like:
;;; This won't realy work; it's just a bad example ...
? (setq #&errno 0)
;;; I don't know if this will work, or what effect it'll have if it does.
? (psetq #&kCGColorBlack #&kCGColorWhite)
More information about the Openmcl-devel
mailing list