• 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: John Stiles <email@hidden>
  • Date: Tue, 24 Jan 2006 17:19:14 -0800

On Jan 24, 2006, at 4:33 PM, Daniel Jalkut wrote:


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.

Yup, you understood what I was getting at. I wasn't worried about some other portion of my code setting the delegate to something else behind my back :)
Thanks for the clarification.




_______________________________________________
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


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>)
 >Re: Small Webkit question (From: Daniel Jalkut <email@hidden>)

  • Prev by Date: Re: Newbie-setting object used as variable of another object
  • Next by Date: Re: invertrect, any cocoa versions suggested?
  • Previous by thread: Re: Small Webkit question
  • Next by thread: collision nsbezierpath
  • Index(es):
    • Date
    • Thread