[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] text Editor filters



robinmcf@altern.org writes (in part) Sun, 12 Mar 2000 22:23:02 +0800

>BTW Jim I don't suppose you'd be interested in writing a small tutorial on how
>to use toolbox calls to manipulate text do you? I've got this ongoing project
>of a text editor in Perl......... ;->

There are in fact two experimental MacPerl TextEditor scripts on
<www.pacperl.com/depts/Codes/> which might be of interest.

'MPEdit' attempts to provide an editable alternative to the MacPerl window
so that it is possible to 'print()' text from a perl script to a window in
which the contents can be edited, saved or returned to the script. It uses
the MacOS Toolbox 'TextEdit' functions which provide a comprehensive and
powerful set of routines to manipulate text silently and efficiently behind
the scenes. MPEdit suffers from the (well known) drawback of TextEdit's
file size limitation (currently 64k I believe for non-styled text).

'MP_Write' is an attempt at a stand-alone text editor which does not use
'TextEdit' but only QuickDraw functions for manipulating the text in the
window and thus has no in-built file size limitation. (That doesn't mean to
say it won't crash for some other reason if fed a monster file of course.)
MP_Write is certainly slower than BBEdit but it is surprising how snappy
the MacPerl program is. Both BBEdit and MP_Write have live scrolling for
instance and whilst BBEdit is the clear winner in the Scrolling Stakes
'MP_Write' turns in quite a creditable performance. At around 40K the
script is also surprisingly small for what it does.

It must be said that 'MPEdit' does nothing that cannot be done better by
BBEdit 5.1.1, and 'MP_Write' sports only a tiny tiny fraction of the
functionality provided by BBEdit. They are both just experimental scripts
exploring some of the possibilities offered by the MacPerl port of the
MacOS Toolbox.

Alan Fry



# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org