I've never done what you are attempting but I have a few ideas.
The classic Window message loop is defined in DISPATCHER - try to add
that functionality to your app.
You may also want to open a console window (aka DOS box). See
START-CONSOLE.
Good luck,
Mike
-----Original Message-----
From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] On Behalf
Of Roger Levy
Sent: Monday, July 28, 2008 7:03 PM
To: sftalk_at_forth.com
Subject: [sftalk] Re: Responding to SwiftForth's Incoming Messages
Mike,
Because of the nature of my graphics tool set the loop needs to be in
the
main thread of my app, and also be blocking.
Since I see no mention of an "update-graphics" call in your example, I
guess
that you assumed that I'd be either running my graphics in a separate
thread
or that the animation was entirely event-driven like a "normal" Windows
app...
What I want to do is call the SwiftForth console's event handler from
INSIDE
of my game/graphics/animation loop, so that I can click on it and work
interactively as normal while my graphics window continues, in effect in
parallel, irregardless of having created the console window by clicking
SF.EXE or from a turnkey. Imagine a film reel and each frame calls the
console's message handler. Does that make sense?
I should also note that I have very little control over the graphics
window
itself; its' events always handled mostly by SDL or Allegro, one or the
other depending on what code base I'm working on.
Because of what I just mentioned about the libraries managing stuff, it
may
not work anyway ... and I don't really understand the way Windows'
windows
work. I just wanted to see if someone could tell me if it was possible
to
do what I described and maybe how too.
Roger
On Mon, Jul 28, 2008 at 8:12 PM, Mike Ghan
<MikeGhan_at_logix-controls.com>wrote:
> Assuming you're running a turnkey app and you want to open the
> SwiftForth console while your app in running, execute something like
> this when your program launches:
>
> : WINMAIN
> CREATE-YOUR-APP-WINDOW ( this should create your app window )
> I'M-TESTING? ( true = launch SF Console )
> IF ['] INTERACTIVE 'STARTER ! DEVELOPMENT
> ELSE ( standalone )
> BEGIN ['] DISPATCHER CATCH 0=
> UNTIL
> 'ONSYSEXIT CALLS ( Execute System Exit Chain )
> 0 ExitProcess
> THEN ;
>
> ' WINMAIN 'MAIN !
>
>
>
> I'M-TESTING? could interrogate the command tail.
>
>
> Hope this helps,
> Mike
>
>
> -----Original Message-----
> From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] On
Behalf
> Of Roger Levy
> Sent: Monday, July 28, 2008 7:40 AM
> To: sftalk_at_forth.com
> Subject: [sftalk] Responding to SwiftForth's Incoming Messages
>
> Copied from original email I sent privately to Leon Wagner:
> I had an idea a long time ago to try to execute the message pump for
the
> SwiftForth console window from an animated app loop (controlling a
child
> graphics window) such that it would make it appear that both windows
> were
> running concurrently. This would enable me to have all the functions
of
> SwiftForth's console available while an animated game program is
> running,
> eliminating the need for a built-in commandline, for testing purposes.
>
> The message pump for the SF console (inside TTY.DLL) doesn't seem to
be
> exposed. Is this idea realistic, and, how could I implement it?
>
> Synonyms for "message pump": Event loop, message dispatcher, message
> loop
>
> -Roger
----------------------------------------------------------------------
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 Tue Jul 29 2008 - 11:26:26 PDT
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 09-Feb-2012. Archive updated nightly.