• 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
Confused by Syntax
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Confused by Syntax


  • Subject: Confused by Syntax
  • From: "Theodore H. Smith" <email@hidden>
  • Date: Sat, 14 May 2005 14:51:18 +0100

I was looking at a sample for NSToolbar. I saw this method:


- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag


What is going on here? The method name is itemForItemIdentifier, OK fine. We have an itemIdentifier param which is an NSString*. We have a willBeInsertedIntoToolbar param which is a BOOL. OK that's all well.

But then what does this "- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar" mean?

Does it mean we are returning an NSToolbarItem* ? If so, then what does "toolbar:(NSToolbar *)toolbar" mean? I don't get it. It almost looks like we are returning two values at once, but that wouldn't make sense either because both items are named as "toolbar", identical naming!

I'm totally floored by this one.

--
elfdata.com/plugin/ Industrial strength string processing, made easy.

"All things are logical. Putting free-will in the slot for premises in
a logical system, makes all of life both understandable, and free."

_______________________________________________
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: Confused by Syntax
      • From: Clark Cox <email@hidden>
    • Re: Confused by Syntax
      • From: Thomas Davie <email@hidden>
  • Prev by Date: Splitter control
  • Next by Date: Interface builder doesn't show my classes
  • Previous by thread: Re: Splitter control
  • Next by thread: Re: Confused by Syntax
  • Index(es):
    • Date
    • Thread