Before we go any further, let's define a delegate object according to the Apple developer guide.
在进行下一步工作之前,我们根据Apple开发指导定义一个委托对象。
After a delegate object is created, the delegate object is typically passed to other code that will call the delegate.
在建立委派物件之后,该委派物件通常是传递到将会呼叫委派的其他程序码。
A delegate object is normally constructed by providing the name of the method the delegate will wrap, or with an anonymous method.
委派物件一般是借由提供委派将包装的方法名称来建构,或使用匿名方法建构。
A delegate object is called by using the name of the delegate object, followed by the parenthesized arguments to be passed to the delegate.
委派物件是使用委派物件的名称,跟随著传递给委派的括号引数来呼叫。
You can use the class as-is or in conjunction with the flow delegate object, which allows you to customize the layout information dynamically.
你可以直接使用这个类或者实现流动代理对象,这样你就可以实现自定义动态布局。
An example where this is useful is when your object is serializable and you have an event that is handled by a non-serializable delegate object.
一个展示了自定义事件访问器有用一面的例子,就是当你的对象是可序列化的、并且你有一个可以被一个不可序列化的委托对象处理的事件的时候。
A delegate object or delegation is a simple and powerful pattern in which one object in a program ACTS on behalf of, or in coordination with, another object.
委托对象或者说委托方法是一个简单且功能强大的模式,在此模式中,程序中的一个对象,其行为代表另一对象,或与其一致。
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 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.
该委托只是返回刚刚实例化的对象,而将构建逻辑留待提供该委托的客户端完成。
The business delegate may in turn rely on a DAO object that in turn relies on a database query or an or mapping query that sorts the CDs very efficiently.
业务代理又可能会依赖于一个dao对象,而后者又依赖于一个数据库查询或OR映射查询,这样可以对CD进行有效的查询。
The message informs the delegate of an event that the delegating object is about to handle or has just handled.
消息通知事件的委托方法,委托对象将要处理或已经处理。
The business delegate component invokes the service and wraps any return value as a model object.
业务委派组件调用该服务,并将任何返回值打包为模型对象。
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对象。
S J2EE Blueprints; defines the behavior and state that is being modeled as an active object; the service Delegate is invoked when its corresponding service request is executed by the Dispatcher.
定义被建模为活动对象的行为和状态;ServiceDelegate在Dispatcher执行对应的服务请求时被调用。
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方法用该池中的对象调用给定的委托,并且确保在该委托完成之后将检索到的对象返回到该池中。
This constructs a new instance of the delegate type using the constructor MyDelegate (object, IntPtr).
通过使用MyDelegate (object, IntPtr)构造器,就构建了一个委托类型的新实例。
Delegation: a pattern where one object periodically sends messages to another object that is specified as its delegate.
Delegation:一个模式,其中,一个对象定期发送消息到另一个被指定作为其代理的对象。
EventHandler is a delegate for a function that takes an Object (the sender) and eventargs.
这里EventHandler是某个函数的委托,该函数带有参数:Object(也就是sender)和eventargs。
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 GetData delegate takes an object of type System.Array as an in parameter.
GetData这个委托把System.Array类型的一个对象作为参数。
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.
如果输入沿着视图层次结构一直向上至窗口对象,那么之后,它将被发送到应用程序本身,并最终传递到应用程序委托。
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对象。
A delegate is a protocol (interface) that defines methods that an object implements in order to receive specific messages from other objects.
委托是一个协议(介面),定义了许多物件可以实作的方法,为了接收来自其他物件的特定讯息。
In the case of the flow layout, the size of the cells and supplementary views are specified as properties, either on the layout object or by using a delegate.
在这个流布局中,单元格和增补视图的大小被指定为属性,不管是在布局对象,或者是代理。
应用推荐