[Openmcl-devel] Missing framework constants
Ron Garret
ron at awun.net
Tue Jul 15 13:19:45 PDT 2008
On Jul 15, 2008, at 12:53 PM, R. Matthew Emerson wrote:
>
> On Jul 15, 2008, at 3:26 PM, Ron Garret wrote:
>
>> This doesn't work:
>>
>> ? (objc:load-framework "QTKit" :qtkit)
>> NIL
>> ? #$QTMediaTypeVideo
>>> Error: Constant not found: X86-DARWIN64::|QTMediaTypeVideo|
>>
>> Am I doing something wrong? Other system constants seem to be there,
>> e.g.:
>>
>> ? #$NSTitledWindowMask
>> 1
>> ? #$NSJPEGFileType
>> 3
>> ?
>
> There's kind of a mismash of numeric and string constants in the
> various frameworks, and it's often hard to tell which is which.
>
> In this case, QTMediaTypeVideo is a string constant, so you have to
> say:
>
> ? #&QTMediaTypeVideo
> #<NS-MUTABLE-STRING "vide" (#x7FFF700CA538)>
> ?
>
Ah. Thanks!
To alleviate my own confusion I assembled a list of ObjC-related syntax:
#$ - numerical constants
#& - string constants
#/ - ObjC methods
#@"..." - Constant ns-strings
And then ObjC classes are accessed as ns:class-name. (Note that the
naming conventions for classes accessed in this manner is different
than the naming convention for methods accessed using the #/ reader
macro.)
Did I miss anything?
rg
More information about the Openmcl-devel
mailing list