• 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: Open Recent menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open Recent menu


  • Subject: Re: Open Recent menu
  • From: Andrew Thompson <email@hidden>
  • Date: Tue, 20 Jul 2004 09:00:04 -0400

On Jul 20, 2004, at 12:18 AM, Sam Wilkins wrote:

Oh my God, I figured it out.
- (BOOL)application:(NSApplication *) openFile:(NSString *)filename
Was what I called my method, I can't believe I went through all of this
just to notice I was missing the argument name after the NSApplication
* argument. WTF did it compile?

C has always worked that way. Its an idiom for making it clear you're not going to use a parameter to a function.
Here, clearly you're not going to use the first (int) parameter, because you didn't bother to name it.

function(int, float foo) {
//do something with foo
}

registerForCallback(&function);

I would guess Objective-C allows things like this to compile to be stylistically compatible with C, though you've discovered it causes problems in your case.


AndyT (lordpixel - the cat who walks through walls)
A little bigger on the inside

(see you later space cowboy ...)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: Open Recent menu (From: Sam Wilkins <email@hidden>)
 >Re: Open Recent menu (From: m <email@hidden>)
 >Re: Open Recent menu (From: Sam Wilkins <email@hidden>)

  • Prev by Date: Re: threads in Xcode
  • Next by Date: Re: Cocoa Bindings Question(s)
  • Previous by thread: Re: Open Recent menu
  • Next by thread: Re: Open Recent menu
  • Index(es):
    • Date
    • Thread