• 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
NSURL Query
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSURL Query


  • Subject: NSURL Query
  • From: Nishant <email@hidden>
  • Date: Wed, 1 Oct 2003 15:11:10 +0100 (BST)

Hi,
I want to display a particular topic of an html file
in a browser, on click of a button.
(That is when i click the button of my cocoa app, it
should display a topic in the browser which is not
necessarily the beginning of the file)

For this I added anchors in my html file.

I tried the following :
- (IBAction) openHtml:(id)sender
{
NSURL *Url=[NSURL
fileURLWithPath:@"/Users/nishant/Test.html#Topic"];
[[NSWorkspace sharedWorkspace] openURL:url];
}

(Here Test.html is the filename).
But this does not seem to work.
However, the url
:"file://localhost/Users/nishant/Test.html#Topic"
works fine in my browser.
Can anyone give me pointers on how to do this?
Thanks and Regards,
Nish


________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: NSTableView text color question
  • Next by Date: Re: Reading The Text of PDF files
  • Previous by thread: Re: Reading The Text of PDF files
  • Next by thread: Dragging from NSTableView
  • Index(es):
    • Date
    • Thread