Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6601025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:42:00+00:00 2026-05-25T18:42:00+00:00

On OSX, I am using XCode to make a desktop app with a webview

  • 0

On OSX, I am using XCode to make a desktop app with a webview in it. The webview loads ok, and I can dynamically load content into it – but when I click on links inside the webview, they are not followed. They change color, but no new page is loaded. If I code my links with javascript like this – then they work.

<a href='http://x/' onClick="window.location = this.href">link there</a>

Is there an Objective-C one liner that allows links to be followed inside web-views?

Is there another issue I am not aware of here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:42:00+00:00Added an answer on May 25, 2026 at 6:42 pm

    Turns out it was because I had code I copied form the web with some custom function to ignore WebPolicyDecisionListener…

    Sorry for asking question without giving all the details – all this objective-c is new to me, I don’t know which bits do what yet. I do some pointing and clicking, and then some coding – I don’t know exactly how that all links up. With other languages, you have the whole program in one place – it takes a bit of a learning curve to get used to… but I digress.

    I fixed by adding some comments – see code below…

    - (void)webView:(WebView *)aWebView 
    decidePolicyForNavigationAction:(NSDictionary *)actionInformation 
            request:(NSURLRequest *)request 
              frame:(WebFrame *)frame 
    decisionListener:(id < WebPolicyDecisionListener >)listener
    {
        if ([self requestIsLinkClick:actionInformation]) {
            if ([@"method" isEqual:[[request URL] scheme]]) {
                SEL selector = NSSelectorFromString([[request URL] resourceSpecifier]);
                if ([prototypeDelegate respondsToSelector:selector]) {
                    [prototypeDelegate performSelector:selector];
                }
            }
            // [listener ignore];
        } // else {
            [listener use];
        //}
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have have made a an osX app without using Xcode. After compiling
I have never made an app using XCode and Cocoa but I think following
I've created an OSX app using Jar Bundler from Xcode following this howto: http://www.centerkey.com/mac/java/
I am using Xcode to create a Cocoa app for Mac OSX written in
I am using Xcode to create a Cocoa app for Mac OSX written in
I am using Xcode to create a Mac OSX, Objective-C, cocoa app. I have
Using Xcode 3.1 on OSX 10.5; is it possible to attach (the debugger) to
I want to distribute my app on OSX (using py2app) and as a Debian
I'm using Xcode 3.2.1 on OSX 10.6.8, and I want to study how Avogadro
I am writing a program using MAC OSX 10.6.6 and xcode 3.2 I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.