RE: More NSStatusItem setTarget / setAction
RE: More NSStatusItem setTarget / setAction
- Subject: RE: More NSStatusItem setTarget / setAction
- From: "Jonathan E. Jackel" <email@hidden>
- Date: Thu, 19 Jun 2003 10:33:21 -0400
>
Adding to my original post:
>
>
The function <iconClicked> is never called so I believe the error might be
>
in the setting of the target or the action. How does one check the result
>
of
>
>
[theItem setTarget:controller]
>
>
since this is void? And how does on check the result of
>
>
[theItem setAction:@selector(iconClicked)]
>
>
Which is also void.
You can check these by NSLogging [theItem target] (which should return the
description of your controller; implement -description to get the full
benefit) and NSStringFromSelector([theItem action]) (which should return
@"iconClicked").
You also might be able to type "PO [theItem target]" and "PO
NSStringFromSelector([theItem action])" in the debugger to get the same
info, but I've found that gdb is not completely reliable when you ask it to
send a message to an object.
Jonathan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.