• 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: David Dunham <email@hidden>
  • Date: Tue, 17 Feb 2009 16:58:14 -0800

On 16 Feb 2009, at 21:34, David Yamartino wrote:

- (NSString *)stringValue
- (void)setStringValue:(NSString *)string

Question 1:

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

Because they're different methods that do different things. The first is a getter, the second a setter.

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

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

You probably don't need to implement stringValue.

You might want to USE stringValue, as in

[field1 setStringValue: [field2 stringValue]];

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?


This mailing list is really for the use of Xcode as a tool, not the languages and APIs which it supports. You're best off finding a mailing list or forum that's oriented towards beginners.

David Dunham A Sharp, LLC
Voice/Fax: 206 783 7404 http://a-sharp.com
"People seem to misinterpret complexity as sophistication" -- Niklaus Wirth



_______________________________________________ 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: Re: Xcode 3.1.2: Svn 1.5 support?
  • Next by Date: xcode crash with strange newline characters
  • Previous by thread: Re: stringValue & setStringValue
  • Next by thread: Info request on Crashreport.app
  • Index(es):
    • Date
    • Thread