[MacRuby-devel] DictionaryServices

Craig Williams cwilliams at allancraig.net
Mon May 24 11:36:34 PDT 2010


Hi ecin,

This appears to be working.

framework '/System/Library/Frameworks/CoreServices.framework/Frameworks/DictionaryServices.framework'

word         = 'History'
word_len = DCSGetTermRangeInString(nil, word, 0);
res            = DCSCopyTextDefinition(nil, word, word_len)

puts "Definition for: #{word}"
puts res

hth,

Craig



On May 23, 2010, at 10:02 AM, ecin wrote:

> I'd like to use Dictionary Services (http://developer.apple.com/mac/library/documentation/UserExperience/Reference/DictionaryServicesRef) to look up definitions in a MacRuby app, but am having a hard time figuring out exactly what I need to require in order to access its functions, as
> 
> framework 'Cocoa'
> framework 'CoreServices'
> 
> doesn't do the trick. Is this another example of missing bridge support, or am I missing something else?
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20100524/6ed8ce73/attachment.html>


More information about the MacRuby-devel mailing list