0

Possible Duplicate:
Style: Dot notation vs. message notation in Objective-C 2.0

In objective-C, you can replace bracket notation when sending message with dot notation

[object msg] becomes object.msg

Is this something I can use interchangeable in most cases, and then keep on chaining

Community
  • 1
  • 1
William Sham
  • 12,849
  • 11
  • 50
  • 67

2 Answers2

0

No, the dot notation is for declared properties.

reddersky
  • 963
  • 1
  • 11
  • 28
0

as suggested you can use dot notation only with properties. You can also use bracket notation for both properties and normal messages (istance methods) but its a good convention to use the dot notation with properties.

You should really try to get used to the bracket notations, i suppose you come from C/C++ :) you will get used to very fast, and its not bad at all.

Ultrakorne
  • 1,303
  • 11
  • 18