• 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
Oddity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Oddity


  • Subject: Oddity
  • From: email@hidden
  • Date: Thu, 15 Nov 2001 23:33:11 -0600

I'm finishing up the first app I've done that's not a tutorial, a simple mortgage calculator. I have a field named 'cityStateZip'. I fill the field with a series of 'stringByAppendingString's. When I first built this part of the routine, I found I couldn't append anything if nothing was intially in the string. So I created the string with a blank: NSString* cityStateZip = @" ". Not a solution I liked because now I have blank spaces in front of my test. When I had the rest of the program running, I went back to this code to try some other stuff. I tried to initWithString:city and a couple of other things, that I couldn't get to work. Anyway, it's getting late and I want the thing to run before quitting for the night. I rewrite: NSString* cityStateZip = @" ". It compiled fine. When I ran the program I got errors. (Unable to access the stupid variable!). After a fair amount of head scratching, I eventually copied the new iteration of the variable name and pasted them over the other instances of it and now it works fine. I am ABSOLUTELY postitive the new variable name was identical to the old ones.

Any quesses as to what happened. (And while we're at it, how do I get the first value, city, into the string without a leading space?)


  • Follow-Ups:
    • Re: Oddity
      • From: Esteban <email@hidden>
    • Re: Oddity
      • From: Angela Brett <email@hidden>
    • Re: Oddity
      • From: Ulrich Kortenkamp <email@hidden>
  • Prev by Date: Re: [OT] Standard OS X Compression format
  • Next by Date: Generating a PDF file without a NSView
  • Previous by thread: Re: NSPortTimeoutException??
  • Next by thread: Re: Oddity
  • Index(es):
    • Date
    • Thread