Re: Protocols on the fly?
Re: Protocols on the fly?
- Subject: Re: Protocols on the fly?
- From: Lloyd Dupont <email@hidden>
- Date: Mon, 28 Apr 2003 15:53:41 +1000
every object have an 'isa' ivar which is a 'Class' object or a 'struct
objc_class *'
'struct objc_class' is defined in /ursr/include/objc/objc-class.h and
it has
its methodList as 'struct objc_method_list **' which is the main thing
in the protocol class.
wel, a bit of cooking, and you should be able to do something.
I suggest you create the protocol as an instance of the object, and
query it on the other side ....
, define in
On Monday, April 28, 2003, at 03:25 PM, Owen Anderson wrote:
Unfortunately, that doesn't help much. I have an object whose
interface I am not aware of, and I want to get a Protocol* object
describing its interface. Is this possible?
Owen Anderson
On Monday, April 28, 2003, at 12:49 AM, Lloyd Dupont wrote:
/usr/include/objc/Protocol.h
you could always create your custom subclass of Protocol, interesting
Objective-C runtime exercise.
beware, Protocol inherit from Object, not NSObject (and so has no
retain/release method)
you could always generate
On Monday, April 28, 2003, at 01:59 PM, Owen Anderson wrote:
Hey folks,
I'm working on a framework that involves passing an object supplied
by the host application to another computer via Distributed Objects.
Now, the object being passed can be of any type, so I don't have a
protocol to attach to it when it is received on the other side. I
can think of two solutions to this: require the host application to
provide a copy of the protocol, or find a way to generate a protocol
from the object. So, folks, is this possible? Given an object, can
I generate a Protocol* for its methods?
Thanks,
Owen Anderson
_______________________________________________
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.
_______________________________________________
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.
_______________________________________________
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.