Re: XForms: How to open a text file in a multiline box ?

Steve Lamont (spl@szechuan.ucsd.edu)
Fri, 21 May 99 11:30:57 PDT

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> I use xforms with fdesign since two days, and I have to do a text editor
> with it.
> But I have a problem, I don't know how to open a file in a multiline
> box.
> Can somebody explain me how to do such a thing ?

You have to do it yourself by reading the file into a buffer and then
calling fl_set_input().

However, as an aside, I'd have to say that unless this is being done
specifically as a programming exercise, you really, really, reeeeeealy
don't want to develop a text editor in XForms.

Presuming that the text editor is a part of some other, larger,
application, I'd suggest that you simply spawn a process, in a window,
if necessary, that invokes the user's favorite text editor.

There are a couple of reasons for doing this:

First off, it saves you a huge amount of time and effort.

Second and, IMHO, more important, it allows the user to edit
text in an environment in which they're comfortable. Why
force the user to learn a whole new set of commands and
keystrokes?

spl

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/