views:

54

answers:

1

Hi,

I've a window that will have an unknown amount of text fields, determined by the content of a remote server.

In high level terms, how should I go about this? Create a custom view or create an empty window with a backing NSWindowController and then add stuff to it when the window is opened?

I've seen the examples on the O'Reilly Cocoa book and those effectively create a custom NSView. Is this the right way to do it, 8 year later?

+4  A: 

You probably want an NSMatrix. A NSMatrix allows you to create an arbitrarily large grid of cells.

Tables, outlines, browser etc are also options depending on your specific needs.

TechZen
You can't put a view into a cell in AppKit, and you don't need to; there is an NSTextFieldCell.
Peter Hosey
Okay, I'll edit.
TechZen