comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » WHat the bloody hell?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
WHat the bloody hell? [message #12007] Thu, 18 June 1998 00:00
au455 is currently offline  au455
Messages: 2
Registered: June 1997
Junior Member
I'm maintaining a GUI written in PVWave running under Open VMS
(No, this wasn't my idea)

Anyways, I'd like the operator to be able to look at a small ASCII
file in a text window, modify it, and save it. Not too tough, eh?

Let's say the file is named foo.dat and t looks like this:

1234
abc
9
lmnop

So, I use WWText with File='foo.dat', col =...

Sorta like this:

TextWin = WwText(Wid,
File = 'foo.dat',
cols=10,
rows=4,
font=...)


This pops up a nice text window showing the operator the file.

The operator can click in this window and change the text using the
keyboard. So far so good.

Now, I need to get the altered text back out of the window and
write it to the file.

So I use:

Text = WwGetvalue(Textwin)

The string Text now contains the value:

1234(lf)abc(lf)9(lf)lmnop

Where (lf) is a linfeed sans carriage return.

If I do a

printf, outunit, Text


where outnunit is the file unit I get:

1234
abc
9
lmnop

Whereas I want:

1234
abc
9
lmnop


WHat should I do? Formatting the print statement is not an option
because the record lenght (and number of records) may be different
after editing. Is there anyway I can substitute a carriage
return/linfeed for the linefeed? Or can I somewhow WwGet the value of
the WWText widget into an array?

I don't wnat to use WwTable, because the operator would have to remember
to enter <return> on each cell they edit, and would likely forget to do
that (I know I would).


So, what the bloody 'ell should I do?




--
DS Caprette
"There's a little truth in all jive, and a little jive in all truth."
-- Leonard Q. Barnes
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: From Bytes to Doubles, etc.
Next Topic: Re: Graphic Window

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:01:36 PDT 2025

Total time taken to generate the page: 0.00758 seconds