Re: More on drawRect not getting called
Re: More on drawRect not getting called
- Subject: Re: More on drawRect not getting called
- From: Alex Kac <email@hidden>
- Date: Sun, 24 Jul 2011 22:13:11 +0200
NSString is the class. myString is an instance of that class and in this case is a variable. myString is information. Its not an operation. It is a class instance which contains information on what the data is and what can be done with it.
mystring is not a function. copy is a method call to that instance of a class.
On Jul 24, 2011, at 10:01 PM, Tom Jeffries wrote:
> On Sun, Jul 24, 2011 at 12:12 PM, Andy Lee <email@hidden> wrote:
>
>> You should know that it is most certainly possible to use that syntax with
>> a variable. For example:
>>
>> NSString *myString = @"abc"; // <== a variable
>> NSString *newString = [myString copy]; // <== a message send
>>
>> You can send messages to both classes and instances of classes. If you are
>> not clear about the difference between a class and an instance, let us know
>> now so we can proceed on the same page.
>>
>
>
> OK, we're each half right- myString in this case is a function, not a class,
> but I would question calling it a variable. Maybe I'm old fashioned, but I
> think it's important to distinguish between information (variables) and
> operations (functions). That is one reason why I'm less than completely
> enthusiastic about Objective C syntax and Cocoa conventions. However, I do
> understand that using them would make it easier to understand what's going
> on.
>
> I've gotten several interesting hints from the comments, which I appreciate.
> I'm going to pursue them, if I don't find a solution I'll see if I can post
> a more understandable example.
>
> Thanks, Tom
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
Alex Kac - President and Founder
Web Information Solutions, Inc.
"If at first you don't succeed, skydiving is not for you."
-- Francis Roberts
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden