Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 286213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:36:58+00:00 2026-05-12T05:36:58+00:00

I am creating an application that has to interact with server data and then

  • 0

I am creating an application that has to interact with server data and then display the results from a database accordingly. I am writing the client side app in Cocoa.

Example: A user logs on to a web application. They have some options for filing a web report. Choices: single line and multiple line. They can choose how many of these fields they have for various variables that they want to input. This is then saved in a MYSQL database for later use.

Example (part 2): The client side application fetches the data in the MYSQL databases and then displays it. The problem is that it is a variable number of fields and a variable number of types.

In other words, the database basically stores if we want to display a NSSecureTextField, NSTextField, etc. and then displays that on the screen. As I pointed out above, the problem is that they are allowed to choose how many and the type of the element they want – so I am not quite sure how to transfer this to code.

And just to clarify, I am not attempting to build an online Interface Builder. Simply a online way to input data which has a variable amount of fields, and various types of these fields. I have the online system created, but I am having difficulty with the client side part.

Any help would be greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:36:58+00:00Added an answer on May 12, 2026 at 5:36 am

    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:

    NSMutableDictionary * interfaceElements = [[NSMutableDictionary alloc] init];
    
    for (NSInteger i = 0; i < 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];
    }
    

    The dictionary of course would not be local to this method, but I think you get the idea.

    Alternatively, you might be able to coerce NSMatrix into automating the layout for you.

    If you’re writing a client application for the iPhone, then I would highly recommend looking to the Settings Application Schema reference 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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 177k
  • Answers 177k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer what helpes flickering a lot is to overload the erasebackground… May 12, 2026 at 3:27 pm
  • Editorial Team
    Editorial Team added an answer MVC WSAT appears to be the tool of choice for… May 12, 2026 at 3:27 pm
  • Editorial Team
    Editorial Team added an answer You have basically two things to test for: Is the… May 12, 2026 at 3:27 pm

Related Questions

Lets suppose I am creating an application for the iphone with a webView down
I am creating an ASP.NET MVC application that has postcode lookup functionality. I capture
I am creating an application that uses the MS Ribbon Control. The ribbon has
I am creating an application that manages multiple instances of an external utility, supplying

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.