• 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
Repost: openURL and Bookmarked Location
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Repost: openURL and Bookmarked Location


  • Subject: Repost: openURL and Bookmarked Location
  • From: Manish Pattath <email@hidden>
  • Date: Mon, 26 Jul 2004 06:09:20 +0100 (BST)

I have an application with 3 WebView's in a window. I
have handled policyDelegate. On click of a button in a
HTML file displayed in a WebView, i get the URL in
function

- (void)webView:(WebView *)webView
decidePolicyForNewWindowAction:(NSDictionary
*)actionInformation
request:(NSURLRequest *)request
newFrameName:(NSString *)frameName
decisionListener:(id)listener

AS
file:///Applications/MyFolder/sub folder/EN/docs_htm/features.html#wp1057682

where #wp1057682 is the bookmarked location to where
the HTML file should be scrolled,when opened in a
browser [opened with openURL].

In the above mentioned function, i just use
NSWorkspace openURL as sown below.


char *pszURL =
file:///Applications/MyFolder/sub folder/EN/docs_htm/features.html#wp1057682

bool bOpenLocation = [[NSWorkspace sharedWorkspace]
openURL:[NSURL URLWithString:[[NSString
stringWithCString:pszURL] description]]];

openURL no doubt open the correct HTML file in the
default Application/Browser but does not scroll to the
bookmarked location.

The browser URL shows the URL as

file:///Applications/MyFolder/sub folder/EN/docs_htm/features.html
when it should be

file:///Applications/MyFolder/sub folder/EN/docs_htm/features.html#wp1057682

I have logged the incoming URL, everthing is fine but
i don't know what openURL does,it opens the URL
without the bookmark.

Any help on this is greatly appreciated.

Thanks in advance.

Rgds
Manish

________________________________________________________________________
Yahoo! India Careers: Over 65,000 jobs online
Go to: http://yahoo.naukri.com/
_______________________________________________
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: Startup Questons
  • Next by Date: Creating a custom button
  • Previous by thread: Re: [Feature-Nag] Ability to call modal dialogs/sheets with input?
  • Next by thread: Creating a custom button
  • Index(es):
    • Date
    • Thread