Accessing Objective C Constants


Can anyone advise if it is possible to access the constants of Objective-C.

An example would be NSCompositeSourceOver in this call:

tell myImage to drawAtPoint_fromRect_operation_fraction_(bottomLeft, imageRect, NSCompositeSourceOver, 1.0)

NSCompositeSourceOver is 2 but it would be far better to actually access the constant.

All the best


Model: MacBook Pro UB 2.4 15"
Browser: Safari 531.9
Operating System: Mac OS X (10.6)

I have not been able to use constants or basic C functions. There is an example on the Release Notes for AppleScriptObjC but it does not work.


Craig Williams


I had a look at the examples at the end of the release notes and could not get it to work with NSCompositeSourceOver.

Perhaps there some more magic we need to learn?