• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Small Webkit question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Small Webkit question
      • From: John Stiles <email@hidden>
References: 
 >Small Webkit question (From: John Stiles <email@hidden>)
 >Re: Small Webkit question (From: glenn andreas <email@hidden>)
 >Re: Small Webkit question (From: John Stiles <email@hidden>)

  • Prev by Date: validateMenuItem not called
  • Next by Date: Re: Newbie-setting object used as variable of another object
  • Previous by thread: Re: Small Webkit question
  • Next by thread: Re: Small Webkit question
  • Index(es):
    • Date
    • Thread