aneuryzm
aneuryzm

Reputation: 64854

"Prepare Content" setting for NSArrayController is off: how to fetch the content?

I've a NSArrayController in Interface Builder and I've disabled the option "prepare content", to fetch the content only when I need it.

But, I'm wondering, do I need to write code for it? Or is there something else I can do in interface builder?

Upvotes: 0

Views: 302

Answers (1)

stevesliva
stevesliva

Reputation: 5665

I believe you need to tell your array controller to "fetch," and yes, you could do it in code by creating an outlet to the Array Controller and calling [myArrayController fetch:self] OR doing it all in interface builder you could do something like connect a button to the Array Controller's fetch action.

Since you're asking specifically about interface builder, you need to option-drag from the button to the array controller object and select the fetch: action.

Upvotes: 1

Related Questions