A sample of MC's ease of use

Steve Pothier (starnet!apple!aries.tucson.saic.com!pothiers)
Wed, 16 Nov 1994 07:46:05 -0700

Once again, I'm impressed by the the ease of use of MC...

I have a little DB I was trying to dump. I dumped in a form that
contained key, tab, data. I got irritated with getting the "jaggies"
in emacs (the data column didn't all line up).

The tab position is partly a function of the data and partly a
function of where my attention needs to be focused. I figured I could
whip up something in a couple minutes. A few minutes later I had my
"formatter". Here's the guts:

-- Do this first:
-- set the endValue of scrollbar "tab" to the width of fld "data"

on scrollbarDrag
put (the thumbPosition of me \
- the leftMargin of fld "data" \
- (the thumbSize of me / 2) \
) \
into tabpos
put tabpos
set the tabstops of fld "data" to round(tabpos)
end scrollbarDrag

I can now drag a slider for my tab stops. Its quick, its clean, it
does exactly what I want with very little investment of time.

-sp-