• 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: How to get a DOMRange
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get a DOMRange


  • Subject: Re: How to get a DOMRange
  • From: "Shawn Erickson" <email@hidden>
  • Date: Mon, 20 Aug 2007 17:33:44 -0700

On 8/20/07, Gerriet M. Denkmann <email@hidden> wrote:
> This looks nice but does not work:
>
> DOMRange *domRange = [ [ DOMRange alloc ] init ];
> [ domRange selectNode: someNode ];
> [ webView setSelectedDOMRange: domRange affinity:
> NSSelectionAffinityUpstream ];
>
> After the first line I get an exception: "+[DOMRange init]: should
> never be used".
> So: what to use instead? Which manuals to read?

I believe you should use -[DOMDocument createRange]... in other words
ask your [[webView mainFrame] DOMDocument] for a range that you can
use.

-Shawn
_______________________________________________

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: How to get a DOMRange
      • From: "Gerriet M. Denkmann" <email@hidden>
References: 
 >How to get a DOMRange (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: email@hidden
  • Next by Date: [Job Posting] Blizzard job opening
  • Previous by thread: How to get a DOMRange
  • Next by thread: Re: How to get a DOMRange
  • Index(es):
    • Date
    • Thread