This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Languages and the fly likes Method naming in Objective-C Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "Method naming in Objective-C" Watch "Method naming in Objective-C" New topic
Author

Method naming in Objective-C

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

Hey,
This Objective-C method takes two parameters.
-replaceSubview:oldView with:newView;
replaceSubview is the method name
oldView is the first parameter name.
What is 'with' and 'newView'?
Thanks for help and time.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60822
    
  65

Objective-C uses smilies in its syntax?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38107
    
  22
It must take two parameters, replacing the first parameter in the object with the second parameter. It seems a peculiar method to write, passing a value which might or might not be a field of your object already, then another value to replace it with which might already be a field of your obect (or might not).
 
 
subject: Method naming in Objective-C
 
Similar Threads
What do you think about Objective-C?
Difference between Message & Method
Bumper Sticker item requests
bumper stickers, blackbeltfactory and other user personalizations (jforum day 2011)
1.4 objective confusinhg ?