• 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: Function Pointer of Class Member Function in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function Pointer of Class Member Function in Cocoa


  • Subject: Re: Function Pointer of Class Member Function in Cocoa
  • From: Ondra Cada <email@hidden>
  • Date: Wed, 22 Jun 2005 01:10:51 +0200

Chang,

On Jun 22, 2005, at 12:57 AM, Zehao Chang wrote:

How do I obtain a function pointer to a member function of a cocoa class?

You don't, for there is no such thing as a "member function" in a cocoa class.


Although it is possible to get a function-pointer to a method implementation, it would not help, for the signature needs "self" and "selector" for first two arguments, and that would not be granted.

Use a normal function, and send messages from it as needed. You can freely use plain-C functions anywhere in ObjC.
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Function Pointer of Class Member Function in Cocoa (From: Zehao Chang <email@hidden>)

  • Prev by Date: Re: NSFileManager - getting list of "safe" files/folders [update]
  • Next by Date: NSTableView row height calculation
  • Previous by thread: Function Pointer of Class Member Function in Cocoa
  • Next by thread: Re: Function Pointer of Class Member Function in Cocoa
  • Index(es):
    • Date
    • Thread