Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm not sure I understand what you're asking for. Isn't it pretty trivial to figure out how many NSTextFields the user wants and then have a little for() loop to create them? You'll probably want to keep track of the textfields, so I would probably do it like this:</p> <pre><code>NSMutableDictionary * interfaceElements = [[NSMutableDictionary alloc] init]; for (NSInteger i = 0; i &lt; numberOfTextFields; ++i) { //this is just to make a frame that's indented 10px //and has 10px between it and the previous NSTextField (or window edge) NSRect frame = NSMakeRect(10, (i*22 + (i+1)*10), 100, 22); NSTextField * newField = [[NSTextField alloc] initWithFrame:frame]; //configure newField appropriately [[myWindow contentView] addSubview:newField]; [interfaceElements setObject:newField forKey:@"someUniqueIdentifier"]; [newField release]; } </code></pre> <p>The dictionary of course would not be local to this method, but I think you get the idea.</p> <p>Alternatively, you might be able to coerce NSMatrix into automating the layout for you.</p> <p>If you're writing a client application for the iPhone, then I would highly recommend looking to the <a href="http://developer.apple.com/IPhone/library/documentation/PreferenceSettings/Conceptual/SettingsApplicationSchemaReference/Introduction/Introduction.html" rel="nofollow noreferrer" title="Settings Application Schema reference">Settings Application Schema reference</a> for inspiration. If you're unfamiliar with this, here's a brief introduction: The iPhone allows developers to move their preferences area from the actual app to the Settings app. This is done by creating a settings bundle and building a plist in a very specific way. Settings.app then discovers that plist, parses it, and builds an interface according to the definition it contains. You can do switches, textfields (even secure ones), sliders, groups, and a couple other kinds of interface elements.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload