• 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: sortedArrayUsingFunction:context: why context is of type void?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sortedArrayUsingFunction:context: why context is of type void?


  • Subject: Re: sortedArrayUsingFunction:context: why context is of type void?
  • From: "b.bum" <email@hidden>
  • Date: Sun, 20 Jun 2004 13:43:25 -0700

On Jun 20, 2004, at 1:31 PM, Sherm Pendley wrote:
Use a typecast:

[someObject doSomething: (NSString*)context];

You can also, of course, typecast the recipient of a message:

[(NSString*)context someStringMethod];

Note that (void *) arguments make it a lot harder to do truly dynamic operations with the runtime. We encountered this in the PyObjC bridge. There is no way to know if the (void *) points to an object, a struct, or is just some random meaningful integer. As such, we end up not being able to support object types in the bridging of that method without introducing considerable fragility.

Handy, yes, but there is a price for the convenience.

b.bum
_______________________________________________
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.


References: 
 >sortedArrayUsingFunction:context: why context is of type void? (From: Marco Michieli <email@hidden>)
 >Re: sortedArrayUsingFunction:context: why context is of type void? (From: Sherm Pendley <email@hidden>)
 >Re: sortedArrayUsingFunction:context: why context is of type void? (From: Sherm Pendley <email@hidden>)

  • Prev by Date: Re: App launch problem
  • Next by Date: Number Formatting
  • Previous by thread: Re: sortedArrayUsingFunction:context: why context is of type void?
  • Next by thread: NSButton behavior
  • Index(es):
    • Date
    • Thread