• 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
Re: Beginners question on String handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Beginners question on String handling


  • Subject: Re: Beginners question on String handling
  • From: William Hunt <email@hidden>
  • Date: Tue, 25 Mar 2008 21:08:58 -0700

I'm going to jump in on this one, since it's one I think I might actually know. :)

Assuming you have two NSTextField *'s, probably declared in your controller's or document's interface...

NSTextField *lastNameField;
NSTextField *firstNameField;

Then the way to get NSString * values from them would be:

NSString *lastName = [lastNameField stringValue];
NSString *firstName = [firstNameField stringValue];

Then you could combine them...

NSString *fullName = [NSString stringWithFormat: @"%@, %@", lastName, firstName];

Is that what you were looking for? If not, then you're probably already beyond the scope of my expertise. ;) Fortunately there are myriad geniuses lying around these groups.

Wil

--
Wil Hunt

"Life is the art of drawing sufficient conclusions from insufficient premises."
-- Samuel Butler



On Mar 25, 2008, at 8:53 PM, Alfred Schmidt wrote:
Can someone point be to the procedure on how to quickly calculate a combined string from separate Text fields

• or point me to some sample code that handles separate strings some fields to combine them.

Thanks can't seem make any progress in this area.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Beginners question on String handling
      • From: Dave Hersey <email@hidden>
References: 
 >Beginners question on String handling (From: Alfred Schmidt <email@hidden>)

  • Prev by Date: Beginners question on String handling
  • Next by Date: Re: Beginners question on String handling
  • Previous by thread: Beginners question on String handling
  • Next by thread: Re: Beginners question on String handling
  • Index(es):
    • Date
    • Thread