|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
caret locationDoes anyone know how to obtain the caret location either in the line or in the file? selectedRanges is not implemented by OakTextView.
Thanks, kirt _______________________________________________ textmate-plugins mailing list textmate-plugins@... http://lists.macromates.com/mailman/listinfo/textmate-plugins |
|
|
Re: caret locationOn 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@... http://lists.macromates.com/mailman/listinfo/textmate-plugins |
|
|
Re: caret locationbindings = [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@...> wrote:
On 8. May 2007, at 07:04, Kirt Fitzpatrick wrote: _______________________________________________ textmate-plugins mailing list textmate-plugins@... http://lists.macromates.com/mailman/listinfo/textmate-plugins |
|
|
Re: caret locationOn 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"]; _______________________________________________ textmate-plugins mailing list textmate-plugins@... http://lists.macromates.com/mailman/listinfo/textmate-plugins |
| Free embeddable forum powered by Nabble | Forum Help |