[TxMt Plugins] caret location

Allan Odgaard throw-away-1 at macromates.com
Wed May 9 07:33:40 UTC 2007


On 8. May 2007, at 21:12, Kirt Fitzpatrick wrote:

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

You need to send the bind:… message to the text view. E.g.:

     NSMutableDictionary* dict = [NSMutableDictionary dictionary];
     [textView bind:@"lineNumber"   toObject:dict  
withKeyPath:@"line"   options:nil];
     [textView bind:@"columnNumber" toObject:dict  
withKeyPath:@"column" options:nil];

     NSLog(@"%@", dict);

     // cleanup
     [textView unbind:@"lineNumber"];
     [textView unbind:@"columnNumber"];








More information about the textmate-plugins mailing list