Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ucla-cs!tj@cs.ucla.edu From: tj@cs.ucla.edu (Tom Johnson) Newsgroups: comp.sys.mac.programmer Subject: Password Dialogs--what is the best way to do them? Message-ID: <36805@shemp.CS.UCLA.EDU> Date: 6 Jul 90 23:24:11 GMT Sender: news@CS.UCLA.EDU Organization: UCLA Computer Science Department Lines: 21 I am trying to implement a password dialog box--something along the lines of that used by AppleShare. The dialog box has two text edit items, one for the user name, and one for the password--I would like to hide the password from the observer (replace it with apples or bullets). I suppose that what I have to do is create a filter proc for the dialog, intercept, KeyDown and AutoKey events, stuff the value into a buffer, and replace the theEvent->message with the character of my choice. My big question is: How do I know when the user is entering text into the Password text edit item (as opposed to the UserName item)? The event record gives me no indication of which item is selected (or does it?), the itemHit variable doesn't tell me, and I don't where to find out. Any ideas? Surely somebody else out there has done this already and can offer me some tips, ideas, or source code. Thanks- Tom -- Tom Johnson UCLA Computer Science Department 3413 Boelter Hall, Los Angeles CA 90024 (213)825-6952 Internet: tj@cs.ucla.edu