[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Typed selector on apple runtime question (StepTalk porting)
From: |
Stefan Urbanek |
Subject: |
Re: Typed selector on apple runtime question (StepTalk porting) |
Date: |
Tue, 09 Nov 2004 22:17:17 -0500 |
On Tue, 2004-11-09 at 20:12 +0000, Nicola Pero wrote:
> I don't think I understand the question :-)
>
> If you want a method signature from a selector, you do
>
> [object methodSignatureForSelector: selector];
>
i know...
> and you get your method signature.
>
> If you don't know the object who is going to perform the selector, then on
> Apple you can't know the method signature -- the best you can do is use
> 'id' for both return value and arguments. To do so, you need to build the
> ObjC types string, then call [NSMethodSignature signatureWithObjCTypes:
> types];.
>
yes
> But presumably -- no idea what you're doing / trying to do -- but maybe
> you can reorganize your software in such a way that you delay getting the
> method signature until you are actually performing the selector, at that
> point you know what the object performing the selector is and you can get
> the right method signature.
>
i did small reorganisation. some of the StepTalk code was written when i
was getting familiar with objective c internals. now i have changed it
and deprecated the type-dependent methods. i have changed all 'proxy'
objects to return their own signatures if possible, if not, then 'id'
typed signature is constructed. all 'unknown methods' are not native
objective-c methods anyway. it is commited to CVS.
> Not knowing what you are trying to do, it's difficult to say more.
> Anyway typed selectors are not supported on Apple.
>
never mind, you helped me :) your post, even with obvious information,
gave me inspiration for what to do.
> Thanks
>
Thanks,
Stefan
--
http://stefan.agentfarms.net
First they ignore you, then they laugh at you, then they fight you, then
you win.
- Mahatma Gandhi