[comp.sys.mac.programmer] Messing with TE and Dialogs

pcossenb@rodan.acs.syr.edu (Paul C. Ossenbruggen) (05/11/89)

        Does anyone know exactly how the TextEdit records in dialog boxes work?
I know that for all of the edit items in the dialog box there is only
one TE record. Does it switch the textH field of the TE record each time you
click on a different edit item? Or does it do something completely different?
Also, what does the editOpen field of the Dialog box do? And my last question,
where does the ParamText variables get stored? (I thought they were low memory
globals but I can't seem to find them in Knaster's book.)
        The reason I want to know this is because I am implementing something
like a dialog box but it is different enough that it needs to be rewritten.
I would, however, like to be able to use the item list defined in the dialog
manager so that I can use ResEdit to create and edit the item lists.

- Paul



-------------------------------------------------------------------------------
|  Paul C. Ossenbruggen                     pcossenb@rodan.acs.syr.edu        |
|  Syracuse University                      rspco@suvm.bitnet                 |
|                                            pcossenb@sunrise.acs.syr.edu      |

rubinoff@linc.cis.upenn.edu (Robert Rubinoff) (05/12/89)

In article <1552@cmx.npac.syr.edu> pcossenb@rodan.acs.syr.edu writes:
>
>       Does anyone know exactly how the TextEdit records in dialog boxes work?
>       The reason I want to know this is because I am implementing something
>like a dialog box but it is different enough that it needs to be rewritten.
>I would, however, like to be able to use the item list defined in the dialog
>manager so that I can use ResEdit to create and edit the item lists.

Actually, you don't need to know anything about how the dialog manager works.
All you need to know is what the user sees (i.e. how things are displayed and
how the DM responds to user actions) and the format of the DLOG and DITL
resources.  This is all explained clearly in Inside Mac (the DM chapter); the
only thing that isn't immediately obvious is this:  the box around editText
items is 3 pixels away on each side of the actual text, and clicking 2 pixels
away or less (i.e. inside the box) counts as clicking on the item.

I can vouch for this because I've written a substitute for the Dialog Manager
myself (that has some extensions, of course; I'm not just trying to reinvent
the wheel), and it can read DLOG resources and create an appropriate "dialog
window".

   Robert