Re: Type introspection with NSMethodSignature, deprecated NSObjCValueType?
Re: Type introspection with NSMethodSignature, deprecated NSObjCValueType?
- Subject: Re: Type introspection with NSMethodSignature, deprecated NSObjCValueType?
- From: Jim Correia <email@hidden>
- Date: Fri, 1 Feb 2008 16:09:25 -0500
On Feb 1, 2008, at 11:23 AM, Benjamin Stiglitz wrote:
Given an arbitrary selector, and after having verified that
instances respond to the selector, I'd like to make sure the method
signature matches a particular form.
Any reason you’re doing this? As Glenn points out, this approach is
fraught with trouble.
If you’re verifying a plugin, there’s always the option of crashing.
There is a reason. :-)
I was revisiting some old code today and noticed that I was perhaps
forwarding too many messages.
I have a view controller (my own class, predates NSViewController)
which hooks into the responder chain when it is active.
The view controller forwards action messages to the view so that it
can get them when it isn't key. (In this particular situation, it
makes sense for the view to be able to zoom, for example, even if some
other view in the window is key.)
For forwarding the messages, I have essentially 3 options:
1) Forward all unhandled messages from the controller to view.
2) Forward only action messages, as determined by introspection.
3) Forward messages only from a pre-defined list.
Today I am doing 1, which is more forwarding than is necessary. 3 is a
potential maintenance headache. So I was investigation options for
implementing #2.
Jim_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden