• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting NSApplicationDelegate protocol
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting NSApplicationDelegate protocol


  • Subject: Re: Getting NSApplicationDelegate protocol
  • From: "Stephen J. Butler" <email@hidden>
  • Date: Fri, 06 Jul 2012 13:01:11 -0500

On Fri, Jul 6, 2012 at 4:35 AM, ecir hana <email@hidden> wrote:
> Sorry I should've said that before: no, I'm on 10.6.
>
> But thanks for the reply!

You're positive you're linking against the 10.6 SDK? Even if you're on
10.6 you might be linking against the 10.5 SDK and that would explain
your problem perfectly.

> On Fri, Jul 6, 2012 at 11:14 AM, Stephen J. Butler <email@hidden
>> wrote:
>
>> On Fri, Jul 6, 2012 at 3:30 AM, ecir hana <email@hidden> wrote:
>> > I'm trying to get the methods a protocol specifies and just stumbled upon
>> > one problem: the following code returns NULL:
>> >
>> >     Protocol *protocol = objc_getProtocol("NSApplicationDelegate");
>>
>> Are you trying this on 10.5? Or are you building this application with
>> the 10.5 SDK?
>>
>> Before 10.6 the NSApplicationDelegate was an informal protocol (that
>> is, a category of methods on NSObject). This is because "@optional"
>> didn't appear till the 10.6 SDK/compiler and previous to that for
>> protocols:
>>
>> 1) all methods were mandatory
>> 2) you couldn't extend the protocol later; once you publish it's set
>> of methods in a Framework you were fixed at that set
>>
>> Point (2) follows from point (1) if you think about it enough.
>>
>> So some of the protocols, like NSApplicationDelegate, weren't really
>> protocols at all. But in 10.6 they introduced "@optional", and
>> NSApplicationDelegate became a formal protocol.
>>
> _______________________________________________
>
> 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
_______________________________________________

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

  • Follow-Ups:
    • Re: Getting NSApplicationDelegate protocol
      • From: Ken Thomases <email@hidden>
    • Re: Getting NSApplicationDelegate protocol
      • From: ecir hana <email@hidden>
References: 
 >Getting NSApplicationDelegate protocol (From: ecir hana <email@hidden>)
 >Re: Getting NSApplicationDelegate protocol (From: "Stephen J. Butler" <email@hidden>)
 >Re: Getting NSApplicationDelegate protocol (From: ecir hana <email@hidden>)

  • Prev by Date: Fwd: Need sample code for NSDocument / NSDocumentController
  • Next by Date: Re: Window-Frame Controls in Lion
  • Previous by thread: Re: Getting NSApplicationDelegate protocol
  • Next by thread: Re: Getting NSApplicationDelegate protocol
  • Index(es):
    • Date
    • Thread