zerorex
Registered
I've been programing in php and java for a while now, and I decided I wanted to take a whack at obj-c and cocoa. So far all looks good, but I have a question. I know that obj-c uses the
[reciever method:arg];
structure for messaging, but i ran across something in the learnign cocoa book i am working through that looks simmilar to this:
[reciever something.something.something];
I didnt think that cocoa use the . structure for anything. Is this just another way of getting to instance variables, or is this something else?
Also, Im not really familure with c programing beyond its implecations in java and such, thus I am not all that familure with pointers. I understand they are ment to be a pointer to the actual instance variable for the object, but I cant figure out when one is needed and when one is not.
for instance, I gather that variables of type int, bool, and other primitives dont need pointers, and that NSObject, or NSString would need a pointer, but what has confused me is that it seems that something like NSRange doesnt need a pointer... Im thinking taht possibly objects which are returned from methods invocations of other objects possibly dont need to be typed as a pointer, but im not sure.
Any help would be much apreciated.
Thanks,
Z
[reciever method:arg];
structure for messaging, but i ran across something in the learnign cocoa book i am working through that looks simmilar to this:
[reciever something.something.something];
I didnt think that cocoa use the . structure for anything. Is this just another way of getting to instance variables, or is this something else?
Also, Im not really familure with c programing beyond its implecations in java and such, thus I am not all that familure with pointers. I understand they are ment to be a pointer to the actual instance variable for the object, but I cant figure out when one is needed and when one is not.
for instance, I gather that variables of type int, bool, and other primitives dont need pointers, and that NSObject, or NSString would need a pointer, but what has confused me is that it seems that something like NSRange doesnt need a pointer... Im thinking taht possibly objects which are returned from methods invocations of other objects possibly dont need to be typed as a pointer, but im not sure.
Any help would be much apreciated.
Thanks,
Z