On a related note, editing the BridgeSupport file for DictionaryServices also 
solved my problems when dealing with Boxed objects. The following code (by 
Craig):

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

would crash since DCSGetTermRangeInString wouldn't return a proper CFRange. 
Changing

<function name='DCSGetTermRangeInString'>
<arg type='^{__DCSDictionary=}'/>
<arg type='^{__CFString=}'/>
<arg type64='q' type='l'/>
<retval type64='{?=qq}' type='{?=ii}'/>
</function>

to 

<function name='DCSGetTermRangeInString'>
<arg type='^{__DCSDictionary=}'/>
<arg type='^{__CFString=}'/>
<arg type64='q' type='l'/>
<retval type64='{_CFRange=qq}' type='{_CFRange=ii}'/>
</function>

in 
/System/Library/Frameworks/CoreServices.framework/Frameworks/DictionaryServices.framework/Resources/BridgeSupport/DictionaryServices.bridgesupport
 did the trick. Seems like macruby-head doesn't have to deal with these issues 
though.
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to