View Full Version : Auto Suggest Text Box
Mar 23, 2008, 04:41 PM
Is it possible to create a text box that has a database feeding it, and automatically suggests the possibilities as you type? I assume yes, and if so, how would you begin to go about that?
Mar 23, 2008, 06:20 PM
SOMEONE GIVE ME A CLUE PLEASE!!!:)
Mar 23, 2008, 06:30 PM
I'm sure its possible, not sure how, but seriously give people more than 1.5 hours (on Easter even) to respond!
Mar 23, 2008, 06:36 PM
Sorry!!! Just trying to get started - you know what it is like!!:D
Mar 23, 2008, 06:36 PM
NSTextView provides this ability already. Look at the Text Completion (http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTextView_Class/Reference/Reference.html#//apple_ref/doc/uid/20000373-DontLinkElementID_32) section.
Mar 23, 2008, 06:50 PM
Thanks kainjow. I am really new to all this. Can you correct me if I am wrong:
I am trying to create a form page with text boxes which have a specific range of names to choose from - e.g from a membership list.
I would like the user to initially create such a membership list from a database, or by entering the data in the same way that you would when you enter into an address book. As I understand it, you may even be able to call upon the Apple Address Book to populate the program list of names?
Once done, I would like the user to be able to fill out a new form page where they select from the data already inserted. Imagine, if you like, a school registration form, where you assign people to certain classes on certain days, etc.
I would have to create a set of text boxes, and insert some form of 'complete' function to each text box???
Also, what would be the way of calling on the database??
Sorry, I hope that is clear...
Mar 23, 2008, 06:54 PM
Well I assumed you were using Cocoa but I don't think that is the case. Are you writing a web page?
Mar 23, 2008, 07:03 PM
No - I was starting to do this from my web site, and then I decided that I would prefer to create a program specifically to organise all of the information. Effectively, I am trying to create a timetabling program, but I have lots of students, lots of teachers, etc. to co-ordinate. So, I started to investigate Cocoa and her I am...
Mar 23, 2008, 07:10 PM
I see. It sounds like you're quite new to Cocoa, so I'd advise you to start from the beginning. Learning to write Mac apps with Cocoa is nothing like writing a web page. There are many things to learn and understand.
It'd be helpful to take a glance through the Cocoa FAQ (http://guides.macrumors.com/Cocoa_FAQ). You may also be interested in later using Core Data.
Mar 24, 2008, 03:32 AM
Sounds like a job for FileMaker Pro to me. Or maybe, for this purpose, Bento from FileMaker.