• 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: Creating WebView in code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating WebView in code


  • Subject: Re: Creating WebView in code
  • From: Jenny M <email@hidden>
  • Date: Tue, 30 Mar 2010 22:53:56 -0700

Hi Nick...

On Sun, Mar 28, 2010 at 12:49 PM, Nick Zitzmann <email@hidden> wrote:
>> Is it possible I could create it in a xib file and keep it invisible,
>> and handle closing programmatically so it's not a waste of memory?
>
> Yes.
>

Okay... how? I can uncheck "visible at launch," then how do I control
the visibility and memory for that window via code?


>> How
>> would I go about this, or is there an easier way?
>
> Subclassing NSView/WindowController, giving it a nib with a WebView, and doing whatever you need to do in that controller subclass would work. Or you could just create the WebView using -initWithFrame:. Note that I've found that WebViews that are not placed inside windows won't actually render anything, so you'll have to create a dummy window as well, though you won't need to open it.
>
> Nick Zitzmann
> <http://www.chronosnet.com/>
>

I looked at initWithFrame, which looked to be my only way to open a
webview completely programmatically, but then I'm not sure what the
NSRect should be. I'll be printing so is there an NSRect I can grab
from NSSharedPrintInfo somewhere??
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Creating WebView in code
      • From: Nick Zitzmann <email@hidden>
References: 
 >Creating WebView in code (From: Jenny M <email@hidden>)
 >Re: Creating WebView in code (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: NSPredicateEditorRowTemplate and dynamic templateViews
  • Next by Date: Adding fixed position subview over a scrollview
  • Previous by thread: Re: Creating WebView in code
  • Next by thread: Re: Creating WebView in code
  • Index(es):
    • Date
    • Thread