Re: Implementing delegates with formal protocols

2009-08-28 Thread tyler
On Aug 28, 2009, at 3:02 PM, Corbin Dunn wrote: On Aug 28, 2009, at 2:57 PM, Rick Mann wrote: Thanks for the suggestions. I have one suggestion saying to extend my protocol to conform to NSObject, and another saying I should use NSObject instead of ID. Is one approach better than the oth

Re: Implementing delegates with formal protocols

2009-08-28 Thread Rick Mann
On Aug 28, 2009, at 15:02:13, Corbin Dunn wrote: On Aug 28, 2009, at 2:57 PM, Rick Mann wrote: Thanks for the suggestions. I have one suggestion saying to extend my protocol to conform to NSObject, and another saying I should use NSObject instead of ID. Is one approach better than the o

Re: Implementing delegates with formal protocols

2009-08-28 Thread Corbin Dunn
On Aug 28, 2009, at 2:57 PM, Rick Mann wrote: Thanks for the suggestions. I have one suggestion saying to extend my protocol to conform to NSObject, and another saying I should use NSObject instead of ID. Is one approach better than the other? Yes; David's suggestion is preferred. It is

Re: Implementing delegates with formal protocols

2009-08-28 Thread Rick Mann
Thanks for the suggestions. I have one suggestion saying to extend my protocol to conform to NSObject, and another saying I should use NSObject instead of ID. Is one approach better than the other? TIA! On Aug 28, 2009, at 14:43:16, David Duncan wrote: On Aug 28, 2009, at 2:36 PM, Rick Ma

Re: Implementing delegates with formal protocols

2009-08-28 Thread tyler
Usually delegates are weak references and not retained to avoid retain cycles or loops. Sent from my phone On Aug 28, 2009, at 2:36 PM, Rick Mann wrote: I have a similar issue when trying to retain and release the delegate (which I think can sometimes be avoided but should be used for st

Re: Implementing delegates with formal protocols

2009-08-28 Thread tyler
Sorry, NSObject* delegate; Note the * Sent from my phone On Aug 28, 2009, at 2:36 PM, Rick Mann wrote: I'm trying to implement a delegate pattern in my code, where the delegate conforms to a formal protocol. But when I make the delegate ivar id and try to send it performSelectorOnMainT

Re: Implementing delegates with formal protocols

2009-08-28 Thread tyler
Use NSObject. Instead of id<...> Sent from my phone On Aug 28, 2009, at 2:36 PM, Rick Mann wrote: I'm trying to implement a delegate pattern in my code, where the delegate conforms to a formal protocol. But when I make the delegate ivar id and try to send it performSelectorOnMainThread:.

Re: Implementing delegates with formal protocols

2009-08-28 Thread David Duncan
On Aug 28, 2009, at 2:36 PM, Rick Mann wrote: I'm trying to implement a delegate pattern in my code, where the delegate conforms to a formal protocol. But when I make the delegate ivar id and try to send it performSelectorOnMainThread:..., it complains that that action is "not found in pr

Implementing delegates with formal protocols

2009-08-28 Thread Rick Mann
I'm trying to implement a delegate pattern in my code, where the delegate conforms to a formal protocol. But when I make the delegate ivar id and try to send it performSelectorOnMainThread:..., it complains that that action is "not found in protocol(s). I have a similar issue when trying