The constructor is used to form a delegate over a target object and a function pointer.
这构造器用来通过一个目标对象和一个函数指针形成一个委托。
The delegating object keeps a reference to the other object, the delegate, and at the appropriate time sends a message to it.
委托对象保持对另一个对象的引用,委托方法在恰当的时间向其发送消息。
This delegate simply returns the newly instantiated object and leaves the construction logic up to the client supplying the delegate.
该委托只是返回刚刚实例化的对象,而将构建逻辑留待提供该委托的客户端完成。
Then, you have to call BeginInvoke on this delegate object.
然后,你必须在这个委托对象上调用BeginInvoke方法。
Singleton — returns reference to the single instance of the delegate object.
Singleton——返回对委托对象单个实例的引用。
The execute method invokes the given delegate with an object from the pool, and ensures that the retrieved object is returned to the pool after the delegate completes.
Execute方法用该池中的对象调用给定的委托,并且确保在该委托完成之后将检索到的对象返回到该池中。
Delegation: a pattern where one object periodically sends messages to another object that is specified as its delegate.
Delegation:一个模式,其中,一个对象定期发送消息到另一个被指定作为其代理的对象。
While the target variable is guaranteed to be only assigned once, the delegate may be called by multiple concurrent threads unless a synchronization object is passed in.
这保证了目标变量只会设置一次。不过,如果没有使用同步对象的话,委托可能会被几个并发线程调用多次。
For example, the proxy class could delegate the method invocation to any other object or even handle it itself.
例如,代理类可以把方法调用委托其他任何对象,甚至是处理程序本身。
This code USES the private methods to retrieve an object from the pool and call the provided delegate.
该代码使用私有方法从池中检索对象,并且调用所提供的委托。
Registration identifies a creation delegate to call when a new instance of the object is required.
注册可以标识创建委托,以便在需要对象的新实例时调用。
The message informs the delegate of an event that the delegating object is about to handle or has just handled.
消息通知事件的委托方法,委托对象将要处理或已经处理。
Thus, subclasses of Model in Listing 2 don't have to define properties of their own - they simply delegate any calls to a property to the underlying entity object.
这样,清单2中的Model的子类不必定义它们自己的属性—它们只是将对一个属性的所有调用委托给这个底层entity对象。
Before we go any further, let's define a delegate object according to the Apple developer guide.
在进行下一步工作之前,我们根据Apple开发指导定义一个委托对象。
In this case, when the data is returned from the NSURLConnection it calls the delegate object and informs it that the data is ready to be parsed so that it can be displayed to the user.
本例中,当数据从nsurlconnection中返回,它调用委托对象并通知它数据已准备好被解析并可以显示给用户。
Dispatcher? Manages an Activation queue of service requests that are pending execution; it decides which request to de-queue next and execute on a service Delegate object that implements the request.
Dispatcher——管理等待执行的服务请求的激活队列;它决定接下来哪个请求退出队列并在实现该请求的ServiceDelegate对象上执行。
The main method then proceeds to delegate the parsing of the argument to a CmdLineParser object, which then returns an Options object.
main方法然后会将参数解析委托给CmdLineParser对象,后者将返回Options对象。
If input gets all the way up the view hierarchy to the window object, it's next sent on to the application itself, which tends to pass it off to an application delegate as a last resort.
如果输入沿着视图层次结构一直向上至窗口对象,那么之后,它将被发送到应用程序本身,并最终传递到应用程序委托。
A delegate is an object that contains a reference to a method.
委托是包含有对一个方法的引用的对象。
Is it necessary to declare an object as a delegate to use it as such?
有必要声明一个对象作为一个代表这样使用它?
A delegate is a protocol (interface) that defines methods that an object implements in order to receive specific messages from other objects.
委托是一个协议(介面),定义了许多物件可以实作的方法,为了接收来自其他物件的特定讯息。
To send a delegate message enumerate the array and send the message to each object.
派代表消息枚举数组和发送消息的每个对象。
In addition, where a function pointer contains only a reference to a particular function, a delegate consists of a reference to an object, and references to one or more methods within the object.
另外,函数指针只包含对特定函数的引用,而委托由对对象的引用以及对该对象内一个或多个方法的引用组成。
You can use the class as-is or in conjunction with the flow delegate object, which allows you to customize the layout information dynamically.
你可以直接使用这个类或者实现流动代理对象,这样你就可以实现自定义动态布局。
Your delegate property naturally stores a reference to a single object.
你的代表性自然存储引用单个对象。
Until you unsubscribe from an event, the multicast delegate that underlies the event in the publishing object has a reference to the delegate that encapsulates the subscriber's event handler.
取消订阅事件之前,发行物件内事件底层的多点传送委派会参考封装订阅者之事件处理常式的委派。
If it finds a provider, this method will delegate the creation call to that object.
如果找到提供程序,此方法就会将创建调用委托给该对象。
After a delegate object is created, the delegate object is typically passed to other code that will call the delegate.
在建立委派物件之后,该委派物件通常是传递到将会呼叫委派的其他程序码。
Completes the dynamic method and creates a delegate that can be used to execute it, specifying the delegate type and an object the delegate is bound to.
完成动态方法并创建一个可用于执行该方法的委托,指定委托类型和委托绑定到的对象。
A delegate object is called by using the name of the delegate object, followed by the parenthesized arguments to be passed to the delegate.
委派物件是使用委派物件的名称,跟随著传递给委派的括号引数来呼叫。
应用推荐