On Oct 17, 2008, at 2:29 PM, Jim Correia wrote:
For object types, in a non-garbage collected application
(traditional retain/release style memory management) you never want
to use assign. It is the equivalent of hand writing an accessor that
does a pointer assignment (with no additional
Thanks for your responses.
Chuck:
First : I used assign in order to be taught about it, actually I
have never explicitly used. but As far as I know assign is the default
so implicitly I have used it. with out problems.
Second: Let me see If I understood. they should be copy since all the
classes
On Oct 17, 2008, at 1:25 PM, Ignacio Enriquez wrote:
Second: Let me see If I understood. they should be copy since all the
classes all conform to NSCopying. this means that all (and I mean ALL
) properties should be copy?? (since all objects inherits from
NSObject and this class conform to
I think I am beginning to understand this.
What gives you the impression that NSObject (and thus all of its subclasses)
conform to NSCopying?
I think I was wrong... I will read the documentation about this.
A property should be copy when you are interested in the *value* of the
thing being
On Oct 17, 2008, at 1:59 PM, Ignacio Enriquez wrote:
I think I am beginning to understand this.
What gives you the impression that NSObject (and thus all of its
subclasses)
conform to NSCopying?
I think I was wrong... I will read the documentation about this.
A property should be copy
--- On Fri, 10/17/08, Ignacio Enriquez [EMAIL PROTECTED] wrote:
Regarding former responses...
aObject.property is like using getter and
setter methods (depending
on the situation)
and just property is going directly to the
property ...
Did I get it right? if so, why using setter methods
On Oct 17, 2008, at 12:25 PM, Ignacio Enriquez wrote:
Thanks for your responses.
You're welcome.
First: self.property is only or reading right?
No. self.property may be used either to get the value of the property
or, as the target of an assignment statement, to set the value of the
Ken:
I'm starting to think that you should avoid declared properties and dot
syntax for now. With some of the newer features of Objective-C and Cocoa,
it can be helpful for novices to first become proficient with the old way
so they understand the details which are hidden by the new way.
In
On Oct 17, 2008, at 10:47 PM, Ignacio Enriquez wrote:
I'm starting to think that you should avoid declared properties and
dot
syntax for now. With some of the newer features of Objective-C and
Cocoa,
it can be helpful for novices to first become proficient with the
old way
so they
hi everyone!
I have a problem that is taking me hours of debbuging time. So I
decided to learn the origin of the problem.
It's about properties (Objective C 2.0)
As you know there are some kinds of properties (nonatomic,
retain,asign, readonly, readwrite... etc)
Let's thinks the next case :
--- 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)
Let's start at the end, where you asked:
On Oct 16, 2008, at 9:19 PM, Ignacio Enriquez wrote:
So I would like to know the difference between self.property and
just property
self.property used for reading the property value (as opposed to
setting it) is exactly equivalent to [self
And because they are immutable types, if they are mutable then retain
is probable the appropriate behaviour. Copy will become retain for
truly immutable objects and if you get a subclass that is mutable then
you don't want that changing under you so copy gives you a new
immutable version.
13 matches
Mail list logo