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

Re: NSOutlineView


  • Subject: Re: NSOutlineView
  • From: Roland King <email@hidden>
  • Date: Tue, 09 Sep 2014 20:13:08 +0800

> On 9 Sep 2014, at 7:16 pm, Charles Jenkins <email@hidden> wrote:
>
> Quincey,
>
>
>
> Move my breakpoint up to the function declaration to see if it’s really being called
> Reinsert the space after the underscore and ignore Xcode’s warnings
> Delete the underscore altogether
>
>

You don’t want a space after the underscore, that’s how you declare a function, not how you call one.

The thing before the colon is the variable name in your function so you can call it anything you want, the only bit which matters is the word before that which is the parameter name at the call site.

But you shouldn’t have to worry about this anyway, if you start typing ‘objectview’ in your class implementation it’ll give you a list of delegate methods and you can hit return for it to fill it in.

In this instance what you’re looking for is

func outlineView(outlineView: NSOutlineView!, objectValueForTableColumn tableColumn: NSTableColumn!, byItem item: AnyObject!) -> AnyObject!

and you can rename outlineView, tableColumn and item to anything you like. objectValueForTableColumn and byItem are required, nothing is needed or permitted at the start before outlineView

and were you to call it, which you won’t, you’d call it like this

.. outlineView( someOutlineView, objectValueForTableColumn:someTableColumn, byItem:someItem )


I’m not sure I like the mix of functions which don’t have parameter names unless they do, methods which have parameter names except for the first parameter mostly but not always and some of the other more schizophrenic permutations but I’m getting used to it. I am quite enjoying generics which let me write functions I have no hope of understanding even as far as next week.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >NSOutlineView (From: Charles Jenkins <email@hidden>)
 >Re: NSOutlineView (From: Ken Thomases <email@hidden>)
 >Re: NSOutlineView (From: Charles Jenkins <email@hidden>)
 >Re: NSOutlineView (From: Quincey Morris <email@hidden>)
 >Re: NSOutlineView (From: Charles Jenkins <email@hidden>)

  • Prev by Date: Re: NSOutlineView
  • Next by Date: Re: NSOutlineView
  • Previous by thread: Re: NSOutlineView
  • Next by thread: Re: NSOutlineView
  • Index(es):
    • Date
    • Thread