• 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
How to make DO not do transformations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to make DO not do transformations


  • Subject: How to make DO not do transformations
  • From: Mike Laster <email@hidden>
  • Date: Tue, 24 Sep 2002 14:27:51 -0400

Is there a clean way to make DO not do any transformations to the arguments? This is DO between threads, not between
processes or hosts.

If I have a method:

- (void) doSomethingWithObject:(NSObject *)anObject;

The default behavior is for the recevier to get an NSProxy that refers to anObject.

I can make a protocol and specify 'bycopy' to make the receiver receive a real object instead of a proxy, but it's still a different
object.

The only way I've found to do it is to alias the argument to an unsigned long, and then unalias it in the method:

- (void) doSomethingWithAliasedObject:(unsigned long)anAliasedObject
{
NSObject *anObject = (NSObject *)anAliasedObject;
}

and the caller would be calling:

[self doSomethingWithObject:(unsigned long)localObject];


While this works, I figured there has to be a cleaner way to do it.
_______________________________________________
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: How to make DO not do transformations
      • From: Robert Goldsmith <email@hidden>
  • Prev by Date: Re: NSDrawer: How to change default 'opening distance'? SOLVED!
  • Next by Date: Re: [Q] Selecting "selected" tab views
  • Previous by thread: Re: NSDrawer: How to change default 'opening distance'?
  • Next by thread: Re: How to make DO not do transformations
  • Index(es):
    • Date
    • Thread