Cocoa-Text (Auto-completing fields)

Discussion in 'Software' started by jumpinj01, May 23, 2008.

  1. jumpinj01

    jumpinj01 Private E-2

    I am trying to write code that auto-completes information from a database.
    I am able to do to get the string I would like to use for auto complete.
    Does anybody know what it is called when the browser completes your "www."
    with "www.yahoo.com" and the ".yahoo.com" is hilighted in blue.

    I am trying to achieve this with NSTextField, is there a better way.
     
  2. jumpinj01

    jumpinj01 Private E-2

    I figured a way out

    I still have a hard time describing what i wanted to do, but i figured it out. At first i was trying to use NSTextField, but that class only lets you select all of the text at once, but i found that NSTextView has a method setSelectedRange:
    that does exactly what i wanted
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds