Path: utzoo!mnetor!uunet!cadnetix.COM!pem From: pem@cadnetix.COM (Paul Meyer) Newsgroups: comp.sys.mac.programmer Subject: Re: TextEdit Items In Dialog Message-ID: <2512@cadnetix.COM> Date: 29 Apr 88 16:44:07 GMT References: Reply-To: pem@cadnetix.COM (Paul Meyer) Organization: Cadnetix Corp., Boulder, CO Lines: 26 Summary: Read the IM volume one [] If you look at the discussion of the Dialog manager in IM I, it will show you what's going on with edittext items. Basically, the dialog record contains a TEhandle which is shared by all the editText items in the dialog (this saves space, and since only one item is edited at a time, it works perfectly). You can use the GetDItem() and SetDItem() calls, and the GetIText() and SetIText() calls, to manipulate nearly everything about the text items anyway. The whole idea of the dialog manager is to do things like TEIdle, TECut, FindControl, etc. etc. for you. If you are doing a modal dialog, ModalDialog() already does all the right things for you. If the dialog is modeless, calling (memory failure for routine name) when IsDialogEvent() says to will do them. If you need to do something so wierd that have to play with the TE record, don't make a dialog at all. Draw a window, and draw controls, etc., and do the normal things with your modifications. Alternatively, you can do what Rich suggested with a userItem, but I can't see why you'd want to. -- Paul Meyer pem@cadnetix.COM Cadnetix Corp. 5775 Central Ave. {uunet,boulder}!cadnetix!pem Boulder, CO 80301 (303)444-8075x244