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

Re: Vended Object Setters


  • Subject: Re: Vended Object Setters
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 17 Apr 2008 10:25:32 -0500

On Apr 17, 2008, at 10:01 AM, Justin Giboney wrote:
bycopy worked, thank you.

Uh, OK. Glad it helped, but your original problem is still mysterious. I don't know about you, but I don't like blindly fixing things without understanding them.



Does this mean though that I need to duplicate all of methods, with one set for internal commands and one for remote commands?

No.

The proper thing to do is to declare a protocol which describes the interface that your vended object exposes. This protocol should be in a header file that both the client and the server can include. The protocol should have all of the type qualifiers that are appropriate.

In the server, have the class of your vended object adopt the protocol. However, you only need to implement each method once. The use of type qualifiers in no way requires that you duplicate methods. For uses internal to the server, the protocol and its type qualifiers won't make any difference.

In the client, it is best to use -[NSDistantObject setProtocolForProxy:] to help the D.O. system avoid some overhead. If you don't do that, then D.O. has to discover the interface of the vended object by querying the server.

Lastly, you might want to use NSProtocolChecker in the server if your vended object has some methods that a client should not be able to invoke.

-Ken
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Vended Object Setters
      • From: Justin Giboney <email@hidden>
References: 
 >Vended Object Setters (From: Justin Giboney <email@hidden>)
 >Re: Vended Object Setters (From: Ken Thomases <email@hidden>)
 >Re: Vended Object Setters (From: Justin Giboney <email@hidden>)

  • Prev by Date: Re: Vended Object Setters
  • Next by Date: Re: NSValue value:withObjCType:
  • Previous by thread: Re: Vended Object Setters
  • Next by thread: Re: Vended Object Setters
  • Index(es):
    • Date
    • Thread