[comp.sys.mac] Hilighting

rek@sei.cmu.edu (Bob Kubiak) (10/04/89)

For reasons I needn't elaborate on, we'd like to be able to prevent (some
class of) users from being able to edit/change the text in the User Name
field of the Chooser once it has been set for them.  If one changes the DITL
item type from editable text to static text, it prevents one from being able
to make a selection with the I-bar in the text and edit it in that way, but
upon entering the Chooser, any keystrokes typed replace the text (since if
the field is not empty the text in it is "selected" upon pulling up the
Chooser).  It seems that there should be a way to deactivate this text
field.  Inside Mac (see the "warning" on p.I-405) discusses disabling of
controls by highlighting them, but there does not seem to be a corresponding
mechanism for editText or statText items (and certainly not one that can be
effected by using ResEdit or friends).

Do you know of a simple way to create the desired effect, or have a pointer
to some doc that describes the appropriate mechanism?  Thanks.

_Bob Kubiak
 Software Engineering Institute

earleh@eleazar.dartmouth.edu (Earle R. Horton) (10/04/89)

In article <4307@go.sei.cmu.edu> rek@sei.cmu.edu (Bob Kubiak) writes:
>For reasons I needn't elaborate on, we'd like to be able to prevent (some
>class of) users from being able to edit/change the text in the User Name
>field of the Chooser once it has been set for them.

	[Failed attempts to lock text field in Chooser
	 dialog template using ResEdit.]

I don't think you can do this by modifying the Chooser dialog, but you
can certainly prevent the Chooser from modifying the user name string
in the System File.

Open the System file, or suitcase file, which contains the Chooser using
ResEdit.  Open the 'DRVR' resource named "Chooser" as 'GNRL'.  Make
the following change.

	A9E2 A9AA 4E5E 4E75  ->  4E71 A9AA 4E5E 4E75

This prevents the Chooser from copying the text from the User Name
editItem to the 'STR ' resource in the system file.  The user can now
change the User Name field in the box as often as he likes, but the
change never takes effect.  The LaserWriter driver, etc. will always
use the approved User Name.  You could initially set the user name
using some other method, since the modified Chooser no longer will do
so.

I recommend that if you actually do this, you rename the Chooser so
people know when they are working with a disabled copy.

This works with "Chooser" from System Tools 6.0.3.

Earle R. Horton