At 2:26 pm -0600 02/02/01, Matthew Langford wrote:
> > I had asked Matthias at the last Perl Conference about a new text engine.
>> He mentioned that he knew of one that could be used but I do not recall if
>> he named it and I certainly do not recall what he said if he did. I was
>> primarily concerned with getting past the 32k limit. He seemed certain
>> that something was possible.
>
>Does Alan Fry's MPEdit qualify? (It's on the MacPerl website contrib
>section.) I thought it was non-32K limited, but not currently set up to
>replace all writes to console--just shows what could be done. Maybe
>someone could use it and his expertise as a starting point?
No, really MPEdit doesn't qualify at all. MPEdit is entirely based on
the Toolbox TextEdit routines so suffers from the TE size limit and
no tab support etc.
MP_Write however was an attempt to write a text editor in MacPerl
without using TextEdit functions at all. It has no size limit and
features live scrolling. It is novel (some might say quirky) in so
far as it sidesteps some of the screen handling problems inherent in
any word processor by doing offscreen updates. This results in a
surprisingly small and compact text handling routine and fast
response. Live scrolling is admittedly not as fast as (say) BBEdit
but it is not _that_ much slower either.
The cost penalty imposed by the strategy is memory usage. Four bytes
of RAM have to be set aside for every pixel in the physical output
window.
From what little I know, for a conventional text handling engine
WASTE would probably be as good a starting point as any. Importantly
the source is free for 'freeware' and MacPerl would obviously
qualify. However there would be a huge amount of work left to be
done, including for instance syntax colouring, integration with
MacPerl 'help' and droplet handling to name but a few. None of these
strike me as a trivial undertaking.
I seriously wonder if the effort would be justified. MacPerl works so
well with those external text editors that support MacPerl, I wonder
if it really needs an internal text editor at all. There are really
only two drawbacks I can think of, one concerning 'help' and the
other concerning 'droplets'.
On the 'help' side, I get on better with 'Programming Perl' at the
ready (with little paper markers stuck in the places one always needs
to go to) than by highlighting a word in the script and calling
'help'. Not infrequently the problem is forgetting exactly what the
'word' _is_, so the call to 'help' fails -- things like '$^W' for
instance; you know there is something like it but can't remember
exactly what. Nearly always however one remembers exactly whereabouts
in 'PP' to look.
With regard to droplets, the problem could perhaps be resolved by a
small utility (either part of MacPerl or not) just to do
'text->droplet' and vice versa.
Eliminating the text editor from MacPerl would ease the maintenance
load a little perhaps? Maybe MacPerl could be distributed with a free
'Lite' version of an external text editor as an option?
Alan Fry