--- On Thu, 10/16/08, Ignacio Enriquez <[EMAIL PROTECTED]> wrote:

> @interface Lesson : NSObject {
> NSString *lessonTitle;
> NSDate *referDate;
> NSNumber *lessonDuration;
> }
> @property (nonatomic, retain) NSString* lessonTitle;
> @property (nonatomic, retain) NSDate *referDate;
> @property (assign) NSNumber * lessonDuration;

Why is lessonDuration assign? That's begging for a crash. All three of these 
should be copy since the classes all conform to NSCopying.

> So the question is
> Inside Lesson.m when i want to call or refer lessonTitle
> what is the best?
> self.lessonTitle or just only lessonTitle? (note that is
> nonatomic, retain))

I prefer to always use accessors. It simplifies memory management if nothing 
else.

> I have been trying a lot of conbination and none of them
> result in
> compilation errors, but when I run the application it
> crashes.!
> So I would like to know the difference between
> self.property and just property

http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_2_section_3.html#//apple_ref/doc/uid/TP30001163-CH11-SW17

Cheers,
Chuck

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________

Cocoa-dev mailing list ([email protected])

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