On Fri, Jul 6, 2012 at 11:56 AM, Ken Thomases <k...@codeweavers.com> wrote:

> > Is there a way to get NSApplicationDelegate protocol besides the
> > compile-time "@protocol()"?
>
> No.  The run-time information about the protocol is obtained from
> information that would have to have been baked into the executable at build
> time.
>
>
> > Also, when I do:
> >
> >    Protocol *protocol = objc_getProtocol("NSTextViewDelegate");
> >
> > return the protocol even when I didn't create any textviews...?
>
> You have presumably loaded AppKit, and AppKit does have the protocol
> details for NSTextViewDelegate baked into it, because it includes classes
> which adopt it and/or code which uses @protocol(NSTextViewDelegate).
>

Thank you. And please, can you explain to me why is it that case? Is it
simply because AppKit includes the definition of NSTextViewDelegate
protocol and not includes one for NSApplicationDelegate? Is it somewhere
documented which protocols are not included? I mean,
besides NSApplicationDelegate, what other delegate definitions cannot be
obtained at runtime? Or is there anything like AppKit which, after being
loaded, provides the definitions?

And for the ones includes, how to get all the methods described?
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to