• 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: Forwarding to Super
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Forwarding to Super


  • Subject: Re: Forwarding to Super
  • From: "Louis C. Sacha" <email@hidden>
  • Date: Sun, 4 Jul 2004 14:03:45 -0700

Hello...

Just reading through your code, there are still a couple of issues:

1) As far as I know, the array type isn't used as a return type and only exists within struct declarations.
The return type would usually be a pointer instead. If you actually run into a case where it uses the type encoding for an array, shouldn't it be handled the same as a pointer anyway (and not using the stret version)?

2) You can't rely on the first letter of the encoded type string being the actual type that is being returned. Qualifiers are also included in the return type in the method signature, so for example the NSString instance method cstring has a encoded return type of "r*" where the first character r indicates the const qualifier.

There is a list of the encoded versions of the qualifiers in the objective-C language documentation at
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/4objc_runtime_overview/chapter_4_section_6.html#//apple_ref/doc/uid/20001425/TPXREF165


Louis


I have included a more complete implementation, which handles
structures as return types and has other changes:
_______________________________________________
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.


  • Follow-Ups:
    • Re: Forwarding to Super
      • From: Herr Witten <email@hidden>
References: 
 >Re: Forwarding to Super (From: Herr Witten <email@hidden>)
 >Re: Forwarding to Super (From: "Louis C. Sacha" <email@hidden>)
 >Re: Forwarding to Super (From: Herr Witten <email@hidden>)
 >Re: Forwarding to Super (From: John Randolph <email@hidden>)
 >Re: Forwarding to Super (From: Herr Witten <email@hidden>)

  • Prev by Date: Key Archiving a NSMutableDictionary object corrupts its embedded NSMutableDictionary data object
  • Next by Date: Re: Supressing mouse-position-events
  • Previous by thread: Re: Forwarding to Super
  • Next by thread: Re: Forwarding to Super
  • Index(es):
    • Date
    • Thread