You will need to change you text field to an instance of NSComboBox. Then, create your NSArray (or of course mutable array) of strings, and send it to the combo box like this:
Let me make it clear ... there is 1 nstextfiled where user will type the value ......
as soon as he starts typing , suggestions will appear in dropdowns list ... usr can select any matching suggestion or he will continue typing .. as typing continues .... drop down list will change ..... .
Same like apple Mail as i mentioned earlier ....
Use an NSTextView instead which has lots of methods to override (or delegate methods if you don't want a custom subclass) for autocompletion. See the documentation under Text Completion.