Re: "-forwardInvocation:" like NSInvocation creation

2010-03-31 Thread Gwynne Raskind
On Mar 31, 2010, at 2:26 AM, Philip Mötteli wrote: >> Another alternative would be to combine method_getNumberOfArguments() and >> method_copyArgumentType() with ffi_prep_cif() and ffi_call(), which I think >> is what libobjc itself does these days. libffi is available since at least >> 10.5. Pa

Re: "-forwardInvocation:" like NSInvocation creation

2010-03-30 Thread Gwynne Raskind
On Mar 30, 2010, at 2:54 PM, Michael Ash wrote: >> I see, I really wasn't enough clear. Lets say, I have a method >> >> - someMethodWithArgument:(struct *)anArgument >> andSomeOtherArgument:(id)anotherArgument >> { >>// Here I want to create an NSInvocation, capturing the call of this >>

Re: "-forwardInvocation:" like NSInvocation creation

2010-03-30 Thread Michael Ash
On Mon, Mar 29, 2010 at 2:15 PM, Philip Mötteli wrote: > Hi, > > > Am 29.03.2010 um 18:52 schrieb A.M.: >> >> On Mar 29, 2010, at 11:07 AM, Philip Mötteli wrote: >> >>> I need to temporary save the invocation of a method. For that, I just need >>> to put the stack frame into an NSInvocation. Unfo

Re: "-forwardInvocation:" like NSInvocation creation

2010-03-29 Thread Philip Mötteli
Am 29.03.2010 um 22:14 schrieb Jerry Krinock: > On 2010 Mar 29, at 12:53, Philip Mötteli wrote: > >> Am 29.03.2010 um 21:31 schrieb Jerry Krinock: >> >>> It handles all argument types > > Correction. I forgot one little limitation, per NSInvocation documentation, > "none of the the parameters

Re: "-forwardInvocation:" like NSInvocation creation

2010-03-29 Thread Philip Mötteli
Am 29.03.2010 um 21:31 schrieb Jerry Krinock: > On 2010 Mar 29, at 12:06, Philip Mötteli wrote: > >> I never said, it's not possible. But it's a huge task to re-implement a >> general method like this. If you understand, that you have to treat every >> different argument type dynamically. > >

Re: "-forwardInvocation:" like NSInvocation creation

2010-03-29 Thread Jerry Krinock
On 2010 Mar 29, at 12:06, Philip Mötteli wrote: > I never said, it's not possible. But it's a huge task to re-implement a > general method like this. If you understand, that you have to treat every > different argument type dynamically. Maybe I don't understand, but a couple years ago I wrote

Re: "-forwardInvocation:" like NSInvocation creation

2010-03-29 Thread Philip Mötteli
Am 29.03.2010 um 20:49 schrieb Jerry Krinock: > On 2010 Mar 29, at 11:15, Philip Mötteli wrote: > >> - someMethodWithArgument:(struct *)anArgument >> andSomeOtherArgument:(id)anotherArgument >> { >> // Here I want to create an NSInvocation, capturing the call of this >> method. Something l

Re: "-forwardInvocation:" like NSInvocation creation

2010-03-29 Thread Philip Mötteli
Am 29.03.2010 um 20:36 schrieb Kyle Sluder: > On Mon, Mar 29, 2010 at 11:15 AM, Philip Mötteli > wrote: >> - someMethodWithArgument:(struct *)anArgument >> andSomeOtherArgument:(id)anotherArgument >> { >>// Here I want to create an NSInvocation, capturing the call of this >> method. Som

Re: "-forwardInvocation:" like NSInvocation creation

2010-03-29 Thread Jerry Krinock
On 2010 Mar 29, at 11:15, Philip Mötteli wrote: > - someMethodWithArgument:(struct *)anArgument > andSomeOtherArgument:(id)anotherArgument > { > // Here I want to create an NSInvocation, capturing the call of this > method. Something like: > NSInvocation *anInvocation = [NSInvocatio

Re: "-forwardInvocation:" like NSInvocation creation

2010-03-29 Thread Kyle Sluder
On Mon, Mar 29, 2010 at 11:15 AM, Philip Mötteli wrote: > - someMethodWithArgument:(struct *)anArgument > andSomeOtherArgument:(id)anotherArgument > { >        // Here I want to create an NSInvocation, capturing the call of this > method. Something like: >        NSInvocation *anInvocation = [NS

Re: "-forwardInvocation:" like NSInvocation creation

2010-03-29 Thread Philip Mötteli
Hi, Am 29.03.2010 um 18:52 schrieb A.M.: > > On Mar 29, 2010, at 11:07 AM, Philip Mötteli wrote: > >> I need to temporary save the invocation of a method. For that, I just need >> to put the stack frame into an NSInvocation. Unfortunately, Apple has >> removed the -setStackFrame: from NSInvoc

"-forwardInvocation:" like NSInvocation creation

2010-03-29 Thread Philip Mötteli
Hello, I need to temporary save the invocation of a method. For that, I just need to put the stack frame into an NSInvocation. Unfortunately, Apple has removed the -setStackFrame: from NSInvocation. Though they still use something like it, because they need it for -forwardInvocation:. Has anyb