jQuery in Action, 3rd edition
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
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "Method naming in Objective-C" Watch "Method naming in Objective-C" New topic

Method naming in Objective-C

Hussein Baghdadi
clojure forum advocate

Joined: Nov 08, 2003
Posts: 3479

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

Joined: Jan 10, 2002
Posts: 63865

Objective-C uses smilies in its syntax?

[Asking smart questions] [About Bear] [Books by Bear]
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46375
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).
I agree. Here's the link: http://aspose.com/file-tools
subject: Method naming in Objective-C
It's not a secret anymore!