Re: [MacRuby-devel] CFRange (Boxed) elements not accessible

2010-06-01 Thread ecin
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_l

Re: [MacRuby-devel] CFRange (Boxed) elements not accessible

2010-05-31 Thread Laurent Sansonetti
On May 31, 2010, at 6:42 PM, Paul Howson wrote: > On 31/05/2010, at 6:12 PM, Laurent Sansonetti wrote: > >>> Any other suggestions for getting around this bug? >> >> It is possible to fix the problem by manually editing the file. >> >> /System/Library/Frameworks/ApplicationServices.framework/Fr

Re: [MacRuby-devel] CFRange (Boxed) elements not accessible

2010-05-31 Thread Paul Howson
On 31/05/2010, at 6:12 PM, Laurent Sansonetti wrote: >> Any other suggestions for getting around this bug? > > It is possible to fix the problem by manually editing the file. > > /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreText.framework/Resources/BridgeSupport/CoreTe

Re: [MacRuby-devel] CFRange (Boxed) elements not accessible

2010-05-31 Thread Laurent Sansonetti
Hi Paul, On May 30, 2010, at 9:51 PM, Paul Howson wrote: > On 31/05/2010, at 11:47 AM, Laurent Sansonetti wrote: > >> Hi Paul, >> >> I believe that here the function is typed to return an anonymous struct >> (likely a bug in the bridgesupport file), so MacRuby won't be able to >> associate it

Re: [MacRuby-devel] CFRange (Boxed) elements not accessible

2010-05-30 Thread Paul Howson
On 31/05/2010, at 11:47 AM, Laurent Sansonetti wrote: > Hi Paul, > > I believe that here the function is typed to return an anonymous struct > (likely a bug in the bridgesupport file), so MacRuby won't be able to > associate it as an NSRange. You may be able to access location using > string_r

Re: [MacRuby-devel] CFRange (Boxed) elements not accessible

2010-05-30 Thread Laurent Sansonetti
Hi Paul, I believe that here the function is typed to return an anonymous struct (likely a bug in the bridgesupport file), so MacRuby won't be able to associate it as an NSRange. You may be able to access location using string_range[0] and length using string_range[1]. Laurent On May 30, 2010

[MacRuby-devel] CFRange (Boxed) elements not accessible

2010-05-30 Thread Paul Howson
Hello Laurent and team, The following code: string_range = CTLineGetStringRange(line) returns a CFRange, which is a C-structure with two elements: location and length. Attempting to access: string_range.location results in the error message: undefined method `location' for #