[TxMt Plugins] ViPlugin - what is the sender for NSResponder::moveDown

Rob Rix rix.rob at gmail.com
Sun Jan 7 20:43:59 UTC 2007


"nil" as the sender should work; it's _generally_ optional, being  
used mainly for connecting user interface elements together that  
might conceivably need to take some hints from the invoking element.  
If nil won't do it, self ought to.

Also, when you see things like below, with selectors not being  
recognized, it is possible that Allan hasn't overridden NSResponder's  
default implementation, which simply raises a "selector not  
recognized" exception. The other thing to note is that you're sending  
to OakWindow here; I'm not clear enough on the operation of the  
responder chain to say for sure, but you might want to send these  
messages not to the window instance but to the window's first responder:

	[[window firstResponder] moveDown: nil]; // or, as noted, "self" if  
nil doesn't work. But it ought to.

Rob Rix

On 7-Jan-07, at 2:30 PM, Kirt Fitzpatrick wrote:

> I should prefix this by mentioning that this is my first foray into  
> Objective-C.  Rob Rix got me started by pointing me to the  
> NSResponder class and telling me about the class-dump script.  But  
> now that I am trying to call the window methods directly I do not  
> know what to pass it as the sender argument.
>
> NSResponder
> - (void)moveDown:(id)sender
>
> I am getting this in the error log.
>
>
> 2007-01-07 11:24:12.133 TextMate[2053] *** -[OakWindow moveDown:]:  
> selector not recognized [self = 0x1645140]
> 2007-01-07 11:24: 12.134 TextMate[2053] sendEvent: Caught  
> NSInvalidArgumentException: *** -[OakWindow moveDown:]: selector  
> not recognized [self = 0x1645140]
>
>
>
> kirt
> _______________________________________________
> textmate-plugins mailing list
> textmate-plugins at lists.macromates.com
> http://lists.macromates.com/mailman/listinfo/textmate-plugins




More information about the textmate-plugins mailing list