• 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: isa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isa


  • Subject: Re: isa
  • From: Ondra Cada <email@hidden>
  • Date: Sun, 2 Jun 2002 02:20:28 +0200

On Saturday, June 1, 2002, at 10:53 , Aram Greenman wrote:

You could avoid this by implementing a method like:

- (id)performSelector:(SEL)sel asClass:(Class)cls {
Class wasa = [self class];
id result;

isa = cls;
result = [self performSelector:sel];
isa = wasa;

return result;
}

possibly in a category of NSObject, along with -performSelector:asClass:withObject:, etc.

I guess you just forgot NS_DURING...NS_HANDLER, did you not? ;))))

That's not meant to be offending, just to reming you that swizzling *IS* dangerous, and you need to *VERY PRECISELY* know what you are doing.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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.
  • Follow-Ups:
    • Re: isa
      • From: Aram Greenman <email@hidden>
References: 
 >Re: isa (From: Aram Greenman <email@hidden>)

  • Prev by Date: Re: URL friendly NSString?
  • Next by Date: Re: about_header_files
  • Previous by thread: Re: isa
  • Next by thread: Re: isa
  • Index(es):
    • Date
    • Thread