Objective-C - What are some uses of the NSProxy class? [closed]
Asked Answered
M

2

10

What are some uses of the NSProxy class. Why would you want to be able to have the description of an object that doesn't exist?

Marchetti answered 22/11, 2011 at 5:52 Comment(1)
Naturally you've read the relevant documentation; can you make your question more specific?Vivie
S
8

The NSProxy class provides a basic implementation of a class whose instances are used to stand in for other objects. We need NSProxy to implement transparent distributed messaging or for lazy instantiation of object.
NSProxy Class Reference
Distributed object programming topics

Scapula answered 22/11, 2011 at 7:15 Comment(1)
I'd say because you copy-pasted the doc, which anyone can find on Google. A personalized answer with example use cases would be appreciated, but this answer has already been accepted.Tasker
U
-1

An NSProxy is an object that forwards messages to an object on a different thread, in a different process, or even on a different host. Read the documentation on Distributed Objects.

Unbridled answered 22/11, 2011 at 6:26 Comment(2)
So you can't use NSProxy for anything else than Distributed Objects?Antimonyl
NSProxy is the means by which distributed objects are implemented. It has no other purpose.Unbridled

© 2022 - 2024 — McMap. All rights reserved.