[Drawkit] respondsToSelector

James Maxwell jbmaxwell at rubato-music.com
Sat Jul 19 12:17:03 PDT 2008


oh holy carp... I found it... -validateMenuItem:

geez...

J.



On 19-Jul-08, at 10:48 AM, James Maxwell wrote:

> Okay, just as a test, to see if I'm really as incompetent as I seem  
> to be, I tried making a menu item to execute "Convert To Path" from  
> DKDrawableShape. The object I'm working with is a subclass of  
> DKDrawableShape, so it should be able to respond to the IBAction.
> So, I created a menu with an item for Convert To Path, added an  
> action for convertToPath: to my First Responder, and connected the  
> menu item to First Responder's convertToPath: action.
> I launched my app, added one of the said DKDrawableShape subclass  
> objects to the drawing, and sure enough, Convert To Path became  
> active in the menu, and selecting it performed the conversion.
>
> So, I do exactly the same thing for the custom method that I want  
> performed. The method is declared as an (IBAction) (just like  
> convertToPath:) and I've added it to the First Responder in IB. I  
> connect it up, and I test it out and... nada... nothing. The menu  
> item doesn't become active when I select the object, so obviously,  
> nothing happens.
>
> I don't see any logical reason why this isn't working. And I've had  
> strange problems with IB before.
>
> Does anybody have any suggestions... This is driving me crazy.
>
> J.
>
>
>
> On 19-Jul-08, at 9:04 AM, James Maxwell wrote:
>
>> Hello All,
>>
>> Could somebody possibly help me understand how to take advantage of  
>> the invocation forwarding in DK?
>> I just generally need to understand how to direct actions from  
>> Interface Builder to particular methods in my app. It looks like it  
>> should be quite simple, because of the way Graham implemented it,  
>> and I feel like I understand what's supposed to be happening, but I  
>> can't make it work.
>>
>> I think this is basically because I'm not clear how MainMenu.nib  
>> menu commands can be targeted at the DKDrawingView, which handles  
>> the forward invocations.
>>
>> If anybody knows how this is intended to work, I'd really  
>> appreciate a nudge in the right direction.
>>
>> thanks,
>>
>> J.
>> _______________________________________________
>> Drawkit mailing list
>> Drawkit at lists.apptree.net
>> http://lists.apptree.net/listinfo.cgi/drawkit-apptree.net
>
> _______________________________________________
> Drawkit mailing list
> Drawkit at lists.apptree.net
> http://lists.apptree.net/listinfo.cgi/drawkit-apptree.net



More information about the Drawkit mailing list