Re: Function Pointer of Class Member Function in Cocoa
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