Hi
Maybe, you could write your code as following:
$ macirb --simple-prompt
>> framework 'AppKit'
=> true
>> range = Pointer.new(NSRange.type)
=> #
>> range.assign NSMakeRange(0,1)
=> #
>> str = NSAttributedString.alloc.initWithString("hello")
=> hello{
}
>> str.attribute(NSUnderlineStyleAttribute
I've only ever made ranges in the past using this syntax:
range = NSMakeRange(0,1)
Which allows you to set the start point and length.
On 21/01/2013, at 22:08, "kwic...@wichry.net" wrote:
> I am trying to implement the following method of NSAttributedString in
> Macruby:
>
> - (id)attri
I am trying to implement the following method of NSAttributedString in Macruby:
- (id)attribute:(NSString *)attributeName atIndex:(NSUInteger)index
effectiveRange:(NSRangePointer)aRange
As by definition, it `Returns the value for an attribute with a given name of
the character at a given index,