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