GeeCON Prague 2014*
The moose likes iOS and the fly likes What are Delegates? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Mobile » iOS
Bookmark "What are Delegates?" Watch "What are Delegates?" New topic
Author

What are Delegates?

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hey,
Are "Delegates" in iPhone jargon equivalent to listeners and callbacks in Java applications?
Thanks.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

John Todd wrote:Hey,
Are "Delegates" in iPhone jargon equivalent to listeners and callbacks in Java applications?
Thanks.


Basically.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 689

John Todd wrote:Hey,
Are "Delegates" in iPhone jargon equivalent to listeners and callbacks in Java applications?
Thanks.


Delegates are helper objects that make it so that you don't have to subclass a class. For example the application object has a delegate that you can subclass so that you don't have to subclass the application object. Many other classes also can have delegates.

-- Kaydell
sickwell secran
Greenhorn

Joined: Jun 06, 2010
Posts: 1
i think too
gourav kumar
Greenhorn

Joined: Jun 20, 2011
Posts: 10
A delegate is a form of type-safe function pointer used by the .NET Framework. Delegates specify a method to call and optionally an object to call the method on. They are used, among other things, to implement callbacks and event listeners.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

gourav kumar wrote:A delegate is a form of type-safe function pointer used by the .NET Framework. Delegates specify a method to call and optionally an object to call the method on. They are used, among other things, to implement callbacks and event listeners.


This is the iPhone forum, so nothing related to .NET

Mark
nik gen
Greenhorn

Joined: Mar 24, 2008
Posts: 12
Hi,

There is a apple doc that explain the Delegate very nicely.
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/CommunicateWithObjects.html#//apple_ref/doc/uid/TP40002974-CH7-SW18

Also there a nice explanation in this forum too. Hope it helps to understand much better.
http://stackoverflow.com/questions/626898/how-do-i-create-delegates-in-objective-c


Thanks,
Niketa.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What are Delegates?