Hi,

On Sep 8, 2014, at 6:00 PM, Charles Jenkins <cejw...@gmail.com> wrote:

> I changed the relevant method to this:
> 
>  func outlineView(
>    _outlineView: NSOutlineView!,
>    objectValueForTableColumn tableColumn: NSTableColumn!,
>    byItem item: AnyObject!
>    ) -> AnyObject!
>  {
>    let node = getDocumentNodeFrom( item )
>    return node
>  }
> 
> 
> And in the particular NSTextFieldCell, I made sure “Bind to Table Cell View” 
> was checked, and I set the model key path to objectValue.title.

Try binding the Value binding of the NSTextField itself, not its cell.  The 
model key path looks right.

>  class DocumentNode : NSObject {
> 
>    var title: String
>    var content: NSAttributedString
>    var children: [DocumentNode]

I haven't been following Swift closely enough to know: is String completely 
interchangeable with NSString?  The text field's binding is going to expect to 
receive an Objective-C object.  It should either be an NSString or an object on 
which it can call -description and get an NSString.

Regards,
Ken


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to