Re: Small Webkit question
Re: Small Webkit question
- Subject: Re: Small Webkit question
- From: Daniel Jalkut <email@hidden>
- Date: Tue, 24 Jan 2006 19:33:43 -0500
On Jan 24, 2006, at 6:53 PM, John Stiles wrote:
id oldDelegate = [myWebView policyDelegate];
[myWebView setPolicyDelegate: self];
...
[myWebView setPolicyDelegate: oldDelegate];
Well yeah, that will work. But if NULL is acceptable, it's nice to
carry around less state.
It's impossible for NULL to be universally acceptable, unless NULL
was the value before you set your delegate :)
That being said, since you own the web view, you get to decide who
the delegate is, and NULL (or nil) is the correct value for "no
delegate."
I sense in your original question some wonderment about whether Apple
might use the delegate mechanism to provide internal workings of the
class. This would be a major violation of the concept of delegation
being used for handing control to an outside client. I don't think
you ever have to worry about replacing a delegate that you didn't set
yourself.
Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden