--- On Mon, 8/11/08, Todd Heberlein <[EMAIL PROTECTED]> wrote:

> Well, you don't need the "self" prefix, but
> you may want to look at  
> using "setters" and "getters". It would
> look like this
> 
> @interface MyThingy : NSObject {
>       ...
>       NSString*       myString;
>       ...
> };
> ...
> @property (copy) NSString* myString;
> ...
> @end
> 
> 
> 
> And then in the implementation file you would have
> something like this:
> 
> @implementation MyThingy
> ...
> @synthesize myString;
> ...
> @end
> 
> 
> And then, when you set the value, you do it like this:
> 
> [self setMyString: anotherString];

Using dot-syntax calls getters and setters. You would get exactly the same 
behavior by calling self.myString = anotherString.

Cheers,
Chuck


      
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to