• 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: Help with an old problem - Solved
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Help with an old problem - Solved


  • Subject: RE: Help with an old problem - Solved
  • From: "Tim Hart" <email@hidden>
  • Date: Wed, 17 May 2006 23:13:37 -0500

I ended up implementing an acceptable solution:

I subclassed NSMethodSignature and over-rode a single method:

+signatureWithObjCTypes:

In this method, I modified the input string so that structures enclosing
pointers to structures were replaced with structures enclosing pointers to
void. So

{struct_a=^{struct_b}}8

Becomes

{struct_a=^v}8

I pass this on to [super signatureWithObjCTypes:].

Then, in my delegating object, methodSignatureForSelector: becomes

-(NSMethodSignature*)methodSignatureForSelector:(SEL)selector
{
    NSMethodSignature *result = nil;
    Method method;

    method = class_getInstanceMethod([delegate class], selector);
    if(NULL != method)
        result = [MyMethodSignature
signatureWithObjCTypes:method->method_types];

    return result;
}


>From there, life is good. I'd appreciate comments if anyone sees anything
hairy lying in wait.

Tim



 _______________________________________________
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: 
 >Help with an old problem (From: "Tim Hart" <email@hidden>)

  • Prev by Date: Re: returning value in a function argument
  • Next by Date: Re: What's so special about NSString literals? (RE: memory management)
  • Previous by thread: Help with an old problem
  • Next by thread: Application Frameworks Evangelist
  • Index(es):
    • Date
    • Thread