NSURL Query
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.