At 11:53 AM -0500 4/18/06, Dobbs, Paul wrote:
Myshell.DataAvailable:
Window1.outEdt.Text = Window1.outEdt.Text + " " + Me.ReadAll
Ouch. Please use outEdt.AppendText, or at least assign to .SelText,
rather than convert the entire EditField contents to a string, add
another string, convert this back to EditFIeld contents, and replace
the entire previous contents with the new content.
RunBtn.Action:
Dim S As New Myshell
S.Mode = 2
StateLbl.Caption = "State: Running"
s.Execute "Writer"
...and at this point, your local MyShell object goes out of scope,
and so is destroyed (abruptly terminating whatever process it was
running).
I figured it out. I needed to add
while s.IsRunning
s.Poll
wend
After the s.execute
No, I wouldn't recommend that! You're in a GUI app, which already
has an event loop, and polls things that need to be polled. You
simply need to not let your Shell object die prematurely. Store a
reference to it on your window, for example. Or better yet, just add
a Shell instance directly to your window in the window editor -- then
you don't even need a MyShell class, as you could implement its
events right on the window.
Best,
- Joe
--
Joseph J. Strout
[EMAIL PROTECTED]
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>