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 #
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
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