• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.


  • Subject: Re: Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.
  • From: Scott Ribe <email@hidden>
  • Date: Wed, 03 Dec 2008 17:33:49 -0700
  • Thread-topic: Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.

> -(CGPoint)getLocalPoint: (UIView*) localView : (CGPoint) globalPoint {

I addition to what others said about using a keyword to name each argument,
I think I see a little confusion in that about position of names vs types.
To an Objective-C person that declaration (and the following call) are very
hard to read because they're so contrary to convention. Here's a
conventional-looking version:

- (CGPoint) getLocalPointFromGlobalPoint: (CGPoint) globalPoint inView:
(UIView*) localView {
    ... Use globalPoint and localView arguments here
}

And

someView.center = [self getLocalPointFromGlobalPoint: CGPointMake(320 / 2,
480 / 2) inView: anotherView];

A couple of pointers:

- Feel free to ignore the spacing. That's my own preference.

- The longer more descriptive name is more in line with the way you'll
usually see things done in Cocoa, but personally I probably would have gone
with a shorter name like your original--assuming the method is intended for
private use rather than a widely-visible name.


--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.
      • From: Citizen <email@hidden>
References: 
 >Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments. (From: Søren Krogh Neigaard <email@hidden>)

  • Prev by Date: Re: Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.
  • Next by Date: Re: Xcode 3.1.2 and svn 1.5
  • Previous by thread: Re: Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.
  • Next by thread: Re: Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.
  • Index(es):
    • Date
    • Thread