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 6639327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:32:28+00:00 2026-05-25T23:32:28+00:00

Unfortunately, the Mac I’m working on does not allow us to attach a debugger,

  • 0

Unfortunately, the Mac I’m working on does not allow us to attach a debugger, so I have no idea what the cause it.

Talk about a baptism by fire.

The tutorial program finds four placeholders and replaces them with text from four text fields.

NSString *stringTemplate = [[NSString alloc] initWithString:txtTemplate.text];
// My pseudo debugger
NSLog(@"%@", stringTemplate);


//Start Weird Exit
NSDateFormatter *dateShortFormat = [[[NSDateFormatter alloc]init]autorelease];
    [dateShortFormat setDateFormat:NSDateFormatterShortStyle];
//End Weird Exit    

//Pseudo debugger
    NSLog(@"%@", txtPlace.text);
    [stringTemplate stringByReplaceingOccurancesOfString:@"<place>" withString:txtPlace.text];
   //txtDate is a TextField
    NSLog(@"%@", txtDate.text);
    [stringTemplate stringByReplaceingOccurancesOfString:@"<date>" withString:[NSString stringFromDate:[dateShortFormat dateFromString:txtDate.text]]];
   //There has to be a shorter way to type that. . .

    NSLog(@"%@", txtVerb.text);
    [stringTemplate stringByReplaceingOccurancesOfString:@"<verb>" withString:txtVerb.text];
    NSLog(@"%@", txtNumber.text);
    [stringTemplate stringByReplaceingOccurancesOfString:@"<number>" withString:txtNumber.text];
    txvStory.text =stringTemplate;

So I don’t ever see the bottom four console messages. But I see the very first message though.

Like always, any improvements would be greatly appreciated. Anything from memory management to design principle advice. Strangely, it is difficult to get a lot of advice in real life. But on the Internet, it seems to come left and right.

  • 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-25T23:32:29+00:00Added an answer on May 25, 2026 at 11:32 pm

    It looks like you’ve either got typos in your post, or your actually sending invalid messages to your date formatter. You have:

    [stringTemplate stringByReplaceingOccurancesOfString ...
    

    Where you should have

    [stringTemplate stringByReplacingOccurancesOfString ...
    

    In other words, there is no “e” in “Replacing”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm definitely not a DBA and unfortunately we don't have a DBA to consult
I'm using the .NET 3.0 class System.Security.Cryptography.MACTripleDES class to generate a MAC value. Unfortunately,
Unfortunately, my question is not as simple as keeping track of two windows created
Unfortunately it looks like for various reasons I'm going to have to use Visual
Unfortunately I don't have access to a *nix box at work or at home.
Unfortunately, the problem is not more specific than that. I've found a few examples
Unfortunately I have to use Windows Server 2003 on my 32 bit workstation due
I'm trying to install PIL on an Intel Mac OS X Leopard machine. Unfortunately,
I have a problem on my mac when trying in R to produce png
I'm working on an Objective-C app that is Mac OS X Lion only. I'm

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.