How to programmatically bind a table content to a NSArrayContoller

I’m able to do this in Xcode, using IB facilities but not in a simple AppleScriptObjC script.
Any help would be appreciated!

Can I ask what you’re trying to do? At face value, it sounds like you might be being touch over-ambitious.

Sorry, Shane. I couldn’t answer you earlier.

I’m working on a sort of "choose from list" replacement.
It sounds useless, but you know my position and why I’m in need of special UI.

Mainly, I need the window to be limited to a maximum size, and the table should accept a list of records (or array of dicts).

I was just wondering if it could be not to difficult to use bindings because I’m more comfortable with this way of doing.

I’m about to achieve my project by using tableView delegate methods.
The only missing thing is the little part of code to manage the max size.
But I’m still interested to have your answer!

:wink:

I can’t give you an answer because I’ve never tried, and it’s not something I’d really like to. For what you describe, using a datasource — or even populating each table cell view in the delegate method tableView:viewForTableColumn:row: —sounds much more sensible.

In facy, @Piyomaru blog post today:

http://piyocast.com/as/

probably gives you all you need.

Ok. I’ll follow you.

That’s what I’m using.

As I said, my project is almost done but there’s still a problem left:
Is there a method like indexOfObject: for several objects or do we have to make a loop?

Thanks for the link to Piyomaru. It’s an excellent place to find inspiration!
:wink:

You have to use a loop.

Ok. Thank you Shane.