[comp.sys.mac.programmer] Need a scrollable, editable text record in a modal dialog

vrm@blackwater.cerc.wvu.wvnet.edu (Vasile R. Montan) (05/21/91)

I need a fully functional TERecord for the user to edit in the context
of a modal dialog.  (Please-- no flames about modality.  This is one
of those places where user interface issues constrain me to use a modal.
It's very much like the script situation in HyperCard-- what other
way would there be to do this but a modal?)

I can think of two ways to do this, and I'm not very happy about either
one.

1.  Use a regular editable text item, which should make the coding a bit
shorter.  For the scroll bar, I will have to rig up some way to get into
the TERec and scroll it myself.

2.  Go ahead and write the code as though this were a TERec in any
normal window, and just catch whatever events I need with the filter
function.  This is most likely the tac I will take; still, I've got
a nagging feeling that there might be some gotchas involved.

What I want to end up with is something very much like HyperCard's
script editor.  I know that HyperCard does this with a modal dialog,
because the DLOG/DITL are there for everyone to see. :-)

Any suggestions or potential gotchas?

--Kurisuto
un020070@vaxa.wvnet.edu

peirce@outpost.UUCP (Michael Peirce) (05/22/91)

In article <1782@babcock.cerc.wvu.wvnet.edu>, vrm@blackwater.cerc.wvu.wvnet.edu (Vasile R. Montan) writes:
> I need a fully functional TERecord for the user to edit in the context
> of a modal dialog.  (Please-- no flames about modality.  This is one
> of those places where user interface issues constrain me to use a modal.
> It's very much like the script situation in HyperCard-- what other
> way would there be to do this but a modal?)
>
> ...
> 
> Any suggestions or potential gotchas?

Look on the latest Developer CD (if you can).  There is a cool Text
Edit control as part of the CShell example code that provides exactly 
what you describe.

-- michael

--  Michael Peirce         --   outpost!peirce@claris.com
--  Peirce Software        --   Suite 301, 719 Hibiscus Place
--  Macintosh Programming  --   San Jose, California 95117
--           & Consulting  --   (408) 244-6554, AppleLink: PEIRCE