Re: Objetive-C sintax
Re: Objetive-C sintax
- Subject: Re: Objetive-C sintax
- From: dhart <email@hidden>
- Date: Sat, 01 Apr 2006 23:49:37 -0800
- Thread-topic: Objetive-C sintax
This is because to create an instance of an NSString object, one must send a
message to the NSString class object. In the line of code provided, you are
sending a message to the NSString class object which will in turn, provide
you with an NSString class instance, which is different. The key is the
conceptual difference between a class, and an instance of the class. The
NSString class object represents the class itself, whereas an NSString
instance is an object of type NSString.
On 4/1/06 11:42 PM, "JuanC" <email@hidden> wrote:
> Hi to everybody!!!
> Could anyone of the gurus of this mailing list explain my this line
> of code:
> NSString *stringFinal = [NSString stringWithFormat:@"%@ tiene %d
> letras",
> [gEntradaDeTexto stringValue],
> [stringDeEntrada length]];
> More expecific, I don't understan why need introduce the class name
> in the first part of de method call. I define a pointer to a variable
> of NSString type and named -stringFinal- but when I make the method
> call I need use NSString in the begining of the call, why?
> Thank you very much in advance.
> Best regards from Spain.
> JuanC++
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden