• 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: stringValue & setStringValue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stringValue & setStringValue


  • Subject: Re: stringValue & setStringValue
  • From: ANE <email@hidden>
  • Date: Tue, 17 Feb 2009 10:39:11 +0100


Am 17.02.2009 um 06:34 schrieb David Yamartino:


I'm on chapter 5 of Aaron Hillegass Cocoa 3rd edition and I'm trying to do the challenge page 90.


In Xcode, when I option double-click on stringValue & setStringValue I get the following:
- (NSString *)stringValue


- (void)setStringValue:(NSString *)string

Question 1:

Why are these two methods of NSTextField class defined in different ways?

These methods are not defined in different ways. These _are_ different methods. The first one is a getter (to retrieve the value "stored" in the stringValue-Property NSTextField), and the second one is a setter (to set the stringValue-Property of NSTextField).


Question 2:
Can someone give me an example of how to implement stringValue?

NSString *_aString = [myNSTextField stringValue];



I can implement setStringValue like this to change the text of field1 to the text in field2:
[field1 setStringValue:field2];


Question 3:

I know programmer-speak is much more efficient for you all than something that would explain my questions above: does anyone know of a good reference that would come down to my level?


"Programming in Objective-C 2.0" by Stephen C. Kochan


Thanks so much for your help,

David
_______________________________________________
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

-- Dr. Volker Thieme Rochlitzstraße 65 Leipzig 04229 Germany

volker.thieme_(at)_mac.com



_______________________________________________
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


References: 
 >stringValue & setStringValue (From: David Yamartino <email@hidden>)

  • Prev by Date: stringValue & setStringValue
  • Next by Date: Info request on Crashreport.app
  • Previous by thread: stringValue & setStringValue
  • Next by thread: Re: stringValue & setStringValue
  • Index(es):
    • Date
    • Thread