Re: Confused by Syntax
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