[TxMt Plugins] caret location

Kirt Fitzpatrick kirt.fitzpatrick at gmail.com
Tue May 8 19:12:05 UTC 2007


I did not find those properties as exposedBindings for OakTextView.  My test
code follows:

    bindings = [responder exposedBindings];
    int i;

    for ( i=0; i < [bindings count]; i++ ) {
        NSLog( @"binding: %@", [bindings objectAtIndex:i] );
    }


This produced the following output.
    2007-05-08 09:43:51.800 TextMate[915] binding: hidden
    2007-05-08 09:43:51.800 TextMate[915] binding: toolTip



Also attempting to bind to lineNumber or columnNumber
    [self bind:@"lineNumber" toObject:responder withKeyPath:@"lineNumber"
options:nil];


causes the following error
     [<OakTextView 0x630c50> valueForUndefinedKey:]: this class is not key
value coding-compliant for the key lineNumber



However lineNumber and columnNumber appear to be available in OakStatusBar.
But I do not know how to grab that object.  Any ideas?

thanks again,
kirt

On 5/8/07, Allan Odgaard < throw-away-1 at macromates.com> wrote:
>
> On 8. May 2007, at 07:04, Kirt Fitzpatrick wrote:
>
> > Does anyone know how to obtain the caret location either in the
> > line or in the file?  selectedRanges is not implemented by
> > OakTextView.
>
> The class does not expose this via any attributes.
>
> It does however have lineNumber and columnNumber as bindable
> properties. So in practice you can use that to get the line/column
> position.
>
> _______________________________________________
> textmate-plugins mailing list
> textmate-plugins at lists.macromates.com
> http://lists.macromates.com/mailman/listinfo/textmate-plugins
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate-plugins/attachments/20070508/37488106/attachment.html>


More information about the textmate-plugins mailing list