![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

Hi Tony,
As far as replying, it is often useful to have the original post part
of your response (like I have done here). It makes it easier to
follow the conversation thread.
I have a better understanding of your problem and still think
InfoWin.F would work just fine. It has a steeper learning curve as it
makes use of SwiftForth's object oriented SWOOP classes. There are
limitations: InfoWin is arbitrarily limited to 500 lines but could be
modified to display more. Try the following:
REQUIRES INFOWIN
INFOWIN SUBCLASS DISPLAYER
\ Resolved Defered Window Size. See Winmaker.F
: MyWindow_Shape ( -- x y cx cy )
10 10 500 400 ;
END-CLASS
DISPLAYER BUILDS MY-DISPLAY
: SIMPLE-EXAMPLE
MY-DISPLAY CONSTRUCT
20 0 DO
I (.) MY-DISPLAY WRITE
LOOP ;
\ ex. S" FooBar.Txt" SHOW-TEXT-FILE
: SHOW-TEXT-FILE ( filename cnt -- )
R/O OPEN-FILE THROW >R ( stash handle )
MY-DISPLAY CONSTRUCT
BEGIN PAD 100 R@ ( handle ) READ-LINE DROP
WHILE PAD SWAP MY-DISPLAY WRITE
REPEAT DROP
R> CLOSE-FILE THROW ;
Hope this helps,
Mike
-----Original Message-----
From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com]On
Behalf
Of Tony Senerchia
Sent: Sunday, June 27, 2004 11:55 AM
To: sftalk_at_forth.com
Subject: [sftalk] Re: Immediate scrolling text in a dialog box
First, is the the right way to reply?
Ok- thank you all for your help, though I must admit that being very
new to Forth, it's a bit tough to work through the code... That and I
haven't really had as much time as I'd have liked for working on this
project.
As for a solution- I haven't found one yet. I tried to work something
out with the listbox, but the LBS_MULTILINE etc did not exist, so
that's a no-go.
I'm still looking for a solution, though, and I am leaning more
towards just this, perhaps it is simpler:
All I need to be able to do is load a text file into a window so that
new (preferrablly) the bottom of the text it showing. The top would be
fine too, I would just prefer the bottom. The point is, I have been
given code that writes to an ASCII buffer and then to a file (or vice
versa), quickly and easily enough. Thus, I can simply output the
strings I want to the buffer, save the buffer in a file, read the file
back into the buffer, paste the text of the file in the window, and
add the next data to the end of the buffer. The only part that I am
missing here is the "paste the text of the file in the window."
The answer may well be in what you have already sent me, I just wanted
to let you know I am still working on it, I just haven't had much
time, and I wanted to give a more specific problem to be solved.
Thank you all,
Tony
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Sun Jun 27 2004 - 13:50:41 PDT
This archive was generated by hypermail 2.2.0 : Wed Nov 19 2008 - 03:04:23 PST