FROM : Mike Shields
DATE : Fri Dec 13 23:16:32 2002
On Friday, December 13, 2002, at 11:15 AM, Mel Walker wrote:
> Since I'm controlling the whole "inheritance" process here with
> forwardInvocation: and methodSignatureForSelector:, is there a way I
> can get bad selectors to fail silently? For example, in the [s junk]
> call, can I just print out "bad selector:'junk'" and keep running with
> the application?
>
> Not that I have any reason at all for doing this in any application
> I'm writing at the moment; it just seems like something cool I'd like
> to know. :-)
Yeah, you can do whatever you like in the -forwardInvocation: and
-methodSignatureForSelector: methods. The default for
-forwardInvocation: just calls [NSException
raise:NSGenericException...]. You could forward messages to -foo to
-bar if you wanted to, or make them no-ops or whatever.
Mike
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Fri Dec 13 23:16:32 2002
On Friday, December 13, 2002, at 11:15 AM, Mel Walker wrote:
> Since I'm controlling the whole "inheritance" process here with
> forwardInvocation: and methodSignatureForSelector:, is there a way I
> can get bad selectors to fail silently? For example, in the [s junk]
> call, can I just print out "bad selector:'junk'" and keep running with
> the application?
>
> Not that I have any reason at all for doing this in any application
> I'm writing at the moment; it just seems like something cool I'd like
> to know. :-)
Yeah, you can do whatever you like in the -forwardInvocation: and
-methodSignatureForSelector: methods. The default for
-forwardInvocation: just calls [NSException
raise:NSGenericException...]. You could forward messages to -foo to
-bar if you wanted to, or make them no-ops or whatever.
Mike
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| pascal | Dec 12, 05:43 | |
| Hasan Diwan | Dec 12, 06:16 | |
| Marco Binder | Dec 12, 16:27 | |
| pascal | Dec 13, 02:36 | |
| matt neuburg | Dec 13, 07:33 | |
| Mel Walker | Dec 13, 19:15 | |
| Mike Shields | Dec 13, 23:16 |






Cocoa mail archive

