Wednesday, November 22, 2017

#1 2009-09-13 02:41:37 am

tellboy
Member
Registered: 2005-06-23
Posts: 152

Accessing Objective C Constants

Hi,

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

An example would be NSCompositeSourceOver in this call:

Applescript:

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

Terry

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

Offline

 

#2 2009-09-13 12:14:40 pm

Craig Williams
Administrator
From:: Ft. Smith, AR
Registered: 2006-12-07
Posts: 888

Re: Accessing Objective C Constants

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.

Regards,

Craig Williams

Offline

 

#3 2009-09-13 12:21:43 pm

tellboy
Member
Registered: 2005-06-23
Posts: 152

Re: Accessing Objective C Constants

Hi,

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?


--Terry

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)