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

Re: Confused by Syntax


  • Subject: Re: Confused by Syntax
  • From: Thomas Davie <email@hidden>
  • Date: Sat, 14 May 2005 14:55:15 +0100


On May 14, 2005, at 2:51 PM, Theodore H. Smith wrote:

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.
No, the method name is toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:
it takes three arguments
- the first is of type NSToolbar * and named toolbar
- the second is of type NSString * and is called itemIdentifier
- the third is of type BOOL and is called flag.


The return type of this method is NSToolbarItem * (indicated by (NSToolbarItem *) at the start of the line)

And it is an instance method (as indicated by the '-' at the start).

Hope that helps

Bob
_______________________________________________
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


References: 
 >Confused by Syntax (From: "Theodore H. Smith" <email@hidden>)

  • Prev by Date: Re: Interface builder doesn't show my classes
  • Next by Date: Re: Splitter control
  • Previous by thread: Confused by Syntax
  • Next by thread: Re: Confused by Syntax
  • Index(es):
    • Date
    • Thread