Kevin Miller wrote:
> On 23/7/01 11:11 pm, Richard Gaskin <[EMAIL PROTECTED]> wrote:
>
>> For MetaCard to be taken seriously as a competitor in the VB space, or
>> anything related to databases, it needs some way to display multicolumn
>> lists in which the columns can truncate display.
>>
>> Using a single field and truncating the text in a script will work, but its
>> only really reliable if we use a monospaced font, and stepping through each
>> line of each column to do the truncation in script on even a modest 3,000
>> records is prohibitively slow.
>
> Why not use multiple fields? This will automatically truncate and does give
> acceptable performance in my experience. Store the data in a variable and
> have one display routine that copies the variable into multiple fields - you
> can call that any time you need to update the display.
I've been doing that, and I found two issues:
- Performance bites. Parsing tab-delimited data turns out to be much
faster than stepping through an array, but even then it takes about
half a second to break up an 8-column listing of 1000 records. If we had
a column-extraction function it would help, but then there's still be:
- Wonky behavior. There are numerous workarounds for handling selections
and such across multiple fields, but none of them are as responsive and
stable-feeling as a single field. For example, how does one implement
a drag-scroll across multiple fields? Discontiguous selections? These
are gimme's with a single field, and challenging kludges with multiple
fields working as a single field.
I did an about-face on this yesterday, setting aside the multi-field
solution to play with some column-truncation algorithms for display in a
single field. I've managed to get the speed down to about half of what it
took to parse columns out. It works great with monospaced fonts, and most
of the time it's "close enough" with non-monospaced fonts. Still a tad
wonky, thought, hence my desire to have such a function built in, so it can
use font-metric calculations more accurately and more quickly.
Of course, there's always new things to learn with MC, so if I've missed the
Ultimate Way To Emulate A Multi-Column List, by all means let me know.
--
Richard Gaskin
Fourth World Media Corporation
Multimedia Design and Development for Mac, Windows, UNIX, and the Web
_____________________________________________________________________
[EMAIL PROTECTED] http://www.FourthWorld.com
Tel: 323-225-3717 ICQ#60248349 Fax: 323-225-0716
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.