Re: Small Webkit question
Re: Small Webkit question
- Subject: Re: Small Webkit question
- From: John Stiles <email@hidden>
- Date: Tue, 24 Jan 2006 15:53:10 -0800
On Jan 24, 2006, at 3:56 PM, glenn andreas wrote:
On Jan 24, 2006, at 5:40 PM, John Stiles wrote:
I want to temporarily change the policy delegate on a web view
I've got.
It's easy to change the delegate to point to me:
[myWebView setPolicyDelegate:self];
Once I'm done, what's the best way to change it back? Empirically,
I've found that this works:
[myWebView setPolicyDelegate:NULL];
But is that the right way to do it?
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.
_______________________________________________
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