• 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
Forwarding, Method Signatures, Woe
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Forwarding, Method Signatures, Woe


  • Subject: Forwarding, Method Signatures, Woe
  • From: Rob Rix <email@hidden>
  • Date: Thu, 20 Feb 2003 22:32:29 -0500

Hello, all.
I'm trying to do some clever (that can be taken in both the good and bad sense of the word) things with forwarding and method signatures.
Basically, I want -methodSignatureForSelector: on my proxy object to get the method signature from its target object, and change it so that its return type is id instead of whatever else it might be; everything else should stay the same.

Some options I've found:
- subclassing NSMethodSignature. I tried this, and felt great... until I found that it SIGBUSes and crashes. Damn. I'd assume it's because the runtime isn't bothering to call the methods or something... anybody know for sure if this should work?

- an undocumented method, +signatureWithObjCTypes: or some such on NSMethodSignature which I found with otool and grep on Foundation; of course, I don't _want_ to use undocumented methods.

- runtime hackery. This is looking likely unless I can figure out how to get my NSMethodSignature subclass to work; the problem is, I don't even know where to begin. It looks like I might have to add a method to my proxy class, get its signature, and remove it... oi.

Anybody have any clever insights? Is it possible that my method signature woes are just because of some retain/release problem in my code, or do method signature subclasses really not work?

Is there a way to create a method signature from an IMP?

Thanks,
-- Robout

"America is the only country that went from barbarism to decadence without civilization in between." -- Oscar Wilde
_______________________________________________
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.
  • Prev by Date: Re: Application Security...
  • Next by Date: Leaking images
  • Previous by thread: [Code] search field à la Mail.app
  • Next by thread: SIGPIPE while printing ! Please help !!
  • Index(es):
    • Date
    • Thread