|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
setMarkDoes OakTextView support the setMark method from the NSResponder interface? Is there something that I can use in its place if setMark is not implemented? Here is the code I am using:
NSLog( @"Trying to set the mark on the first responder" ); [responder performSelector: @selector(setMark:) withObject: window]; NSLog( @"set the mark on the first responder" ); And this is what I get in the log: 2007-04-08 19:55:01.838 TextMate[916] Trying to set the mark on the first responder 2007-04-08 19:55:01.838 TextMate[916] *** -[OakTextView setMark:]: selector not recognized [self = 0xdec3850] 2007-04-08 19:55:01.838 TextMate[916] *** -[OakTextView setMark:]: selector not recognized [self = 0xdec3850] thanks kirt _______________________________________________ textmate-plugins mailing list textmate-plugins@... http://lists.macromates.com/mailman/listinfo/textmate-plugins |
|
|
Re: setMarkOn 9. Apr 2007, at 04:59, Kirt Fitzpatrick wrote:
> Does OakTextView support the setMark method from the NSResponder > interface? No. > Is there something that I can use in its place if setMark is not > implemented? Depends on what you want to achieve. Bookmarks work almost like marks. _______________________________________________ textmate-plugins mailing list textmate-plugins@... http://lists.macromates.com/mailman/listinfo/textmate-plugins |
|
|
Re: setMarkThere are certain vi functions that do not follow the standard NSResponder template such as moving to the beginning of the line and modifying the selection. I was hoping to use marks to handle visual mode vs command mode. Below you can see how it is used.
kirt - (void)deleteRight:(NSNumber *)theIndex { if ( [router mode] == ViVisualMode ) { [responder performSelector: @selector(deleteToMark:) withObject: window]; [router setMode: ViCommandMode]; } else { [responder performSelector: @selector(deleteForward:) withObject: window]; } } - (void)deleteLeft:(NSNumber *)theIndex { if ( [router mode] == ViVisualMode ) { [responder performSelector: @selector(deleteToMark:) withObject: window]; [router setMode: ViCommandMode]; } else { [responder performSelector: @selector(deleteBackward:) withObject: window]; } } - (void)visual:(NSNumber *)theIndex { NSLog( @"Setting visual mode" ); [router setMode:ViVisualMode]; NSLog( @"Trying to set the mark on the first responder" ); [responder performSelector: @selector(setMark:) withObject: window]; NSLog( @"set the mark on the first responder" ); } On 4/9/07, Allan Odgaard <throw-away-1@...> wrote: On 9. Apr 2007, at 04:59, Kirt Fitzpatrick wrote: _______________________________________________ textmate-plugins mailing list textmate-plugins@... http://lists.macromates.com/mailman/listinfo/textmate-plugins |
|
|
Re: setMarkkirt
On 4/9/07, Kirt Fitzpatrick <kirt.fitzpatrick@...> wrote: There are certain vi functions that do not follow the standard NSResponder template such as moving to the beginning of the line and modifying the selection. I was hoping to use marks to handle visual mode vs command mode. Below you can see how it is used. _______________________________________________ textmate-plugins mailing list textmate-plugins@... http://lists.macromates.com/mailman/listinfo/textmate-plugins |
|
|
Re: setMark
I'm having trouble finding information about bookmarks. Is this a Cocoa thing or a TextMate specific thing? Can you give me hint about what I should lookup if it is Cocoa or could you give me a two line example of how to set a bookmark and highlight to the bookmark if it is a TextMate thing? Thanks in advance. kirt _______________________________________________ textmate-plugins mailing list textmate-plugins@... http://lists.macromates.com/mailman/listinfo/textmate-plugins |
|
|
Re: setMarkOn 11. Apr 2007, at 18:38, Kirt Fitzpatrick wrote:
>> Depends on what you want to achieve. Bookmarks work almost like >> marks. > > I'm having trouble finding information about bookmarks. Is this a > Cocoa thing or a TextMate specific thing? Can you give me hint > about what I should lookup if it is Cocoa or could you give me a > two line example of how to set a bookmark and highlight to the > bookmark if it is a TextMate thing? Thanks in advance. It’s a TextMate thing -- it’s what you set using ⌘F2. I don’t think this is useful for what you need, sorry. _______________________________________________ textmate-plugins mailing list textmate-plugins@... http://lists.macromates.com/mailman/listinfo/textmate-plugins |
| Free embeddable forum powered by Nabble | Forum Help |