From: Duncan M. <du...@on...> - 2009-03-18 18:31:59
|
Always the way, just as soon as you post - you find the solution. So for those who may follow require_framework '/System/Library/Frameworks/ ApplicationServices.framework/Versions/Current/Frameworks/QD.framework' is correct, but I then need to use QD::ATSUCreateStyle Keep up the good work :-) Duncan On 18 Mar 2009, at 09:40, Duncan McGregor wrote: > Hi > > First thanks for RubyCocoa. As the author of Rococoa, which does a > similar job for Java, I really appreciate what you've done. > > I'm trying to access Apple Type Services for Unicode Imaging (ATSUI) > through RubyCocoa - in order to measure text before I lay it out. > > I need to call, for example - ATSUCreateStyle > > This is defined in ATSUnicodeObjects.h, which seems to be found in > > /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ > QD.framework > > I'm having trouble working out how to gain access to this API. > > When I wanted to use CoreIO I used > > require_framework '/System/Library/Frameworks/ > ApplicationServices.framework/Versions/Current/Frameworks/ > ImageIO.framework' > > So I expected that > > require_framework '/System/Library/Frameworks/ > ApplicationServices.framework/Versions/Current/Frameworks/ > QD.framework' > > would work, but I get NoMethodError: undefined method > `ATSUCreateStyle' when I try to call the function. > > Can anyone please point out what I'm doing wrong? > > Thanks in anticipation > > Duncan McGregor |