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

  • SEARCH
  • Home
  • 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 6689317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:30:18+00:00 2026-05-26T05:30:18+00:00

Dearest stackoverflow brains, I’m having some trouble with iOS again… I am new to

  • 0

Dearest stackoverflow brains, I’m having some trouble with iOS again… I am new to this all though.

I’m trying to open a safari with a url, that includes a URL parameter based on the value of the table cell. So if the table cell contained “stack”, I want to go to “http://stack.com?param=stack”. This should be a simple task, but I’m having trouble getting it to work.

It’s failing before I even get to the UIApplication line… so I don’t even know if that will work. I’m getting this error:

2011-10-14 10:18:32.297 NPT[1085:207] *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '*** initialization method -
initWithCharactersNoCopy:length:freeWhenDone: cannot be sent to an abstract object of
class NSCFString: Create a concrete instance!'

When I use this code:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString* thisValue = [[[self.searchResults cellForRowAtIndexPath:indexPath] textLabel] text];

    NSString* thisPlateURL = [
                          [NSString new] 
                          initWithFormat:@"http://www.site.co.uk?&regno=%@", thisValue
                          ];

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString: thisPlateURL]];

    [thisPlateURL release];
}

I’m guessing it’s something to do with me not setting thisValue properly, and I’m sure I’ll kick myself if someone spots it, but I just don’t see what the problem is.

Please help!

  • 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-26T05:30:19+00:00Added an answer on May 26, 2026 at 5:30 am

    I think that the problem is in NSString initialization:

    try with:

    NSString* thisPlateURL = [NSString stringWithFormat: @"http://www.site.co.uk?&regno=%@", thisValue];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello again dearest Experts, I am still having issues getting tooltips to work correctly.
Hello dearest community, I am trying to build a simple AutoUpdate application using VB.NET.
Hello dearest community, First of all, I hope my intention is not missconcept. I
dearest experts. You helped me with this issue on this link below previousl: How
Hello dearest community. I have trouble in the last two days, that I can't
Hello dearest community, EDITED This is my solution, based on Devart answer. I slightly
Hello again dearest Experts, I have an ecommerce site at http://www.millenniumhealthproducts.com The site was
Hello dearest community, I am just a regular use of git in Windows. Now
!!! WARNING !!! Dearest SQL expert, please keep reading before to start to scream.
Hello dearest community, I run into problem of creating an exact MD5 of a

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.