1. A nice window vs Win console
- Posted by jondolar <lavigne.s at videotron.ca> Jul 26, 2003
- 520 views
As far as I understand, all output produced by Euphoria code that I write goes to the Windows console...unless I code myself a window with IDE for example and incorporate that code in my program and use special procedures with things like SetPenPos, wPuts etc. to output my stuff on a decent looking screen. This should be handled internally by euphoria with a different parameter. With puts(4,x) for example, the 4 would indicate that I want my output to a simple full screen window. What do you think of that Robert Craig >From a frustrated newbie who likes Euphoria Serge Lavigne
2. Re: A nice window vs Win console
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Jul 26, 2003
- 481 views
On Sat, 26 Jul 2003 00:20:32 +0000, jondolar <lavigne.s at videotron.ca> wrote: > > >As far as I understand, all output produced by Euphoria code that I=20 >write goes to the Windows console...unless I code myself a window with=20 >IDE for example and incorporate that code in my program and use special=20 >procedures with things like SetPenPos, wPuts etc. to output my stuff on=20 >a decent looking screen. Whatever that might look like. > This should be handled internally by euphoria=20 >with a different parameter.=20 >With puts(4,x) for example, the 4 would=20 >indicate that I want my output to a simple full screen window. message_box(text,title,MB_OK) is about the closest you'll get. > >What do you think of that Robert Craig Rob didn't write the windows API > >>From a frustrated newbie who likes Euphoria =20 You have a steep learning curve to look forward to A proper windows program needs an event loop, for a start. The following program is about the simplest mock up of what you seem to want. Someone might post a better example, but this is about as simple as I can make it. Pete -- not useful, for one-off demonstration only: without warning include win32lib.ew with trace constant main=3Dcreate(Window,"Output",0,0,0,1000,750,0), text=3Dcreate(MleText,"",main,5,5,990,710,ES_READONLY) procedure write(sequence message) insertText(text,message&"\r\n") setIndex(text,length(getText(text))+1) end procedure =09 procedure onActivate(integer self, integer event, sequence message) for i=3D1 to 100 do write(sprintf("%d",i)) doEvents(0) if remainder(i,10)=3D0 then sleep(1) end if end for write("done") end procedure setHandler(main,w32HActivate,routine_id("onActivate")) WinMain(main,Normal)
3. Re: A nice window vs Win console
- Posted by mistertrik at hotmail.com Jul 26, 2003
- 482 views
>From: jondolar <lavigne.s at videotron.ca> > >As far as I understand, all output produced by Euphoria code that I >write goes to the Windows console...unless I code myself a window with >IDE for example and incorporate that code in my program and use special >procedures with things like SetPenPos, wPuts etc. to output my stuff on >a decent looking screen. This should be handled internally by euphoria >with a different parameter. With puts(4,x) for example, the 4 would >indicate that I want my output to a simple full screen window. > >What do you think of that Robert Craig > Hear hear! I think that's a great idea, especially if it had a scrollbar when it filled up. I'm running windows 98, and the DOS window's are very crappy. Maybe even make it the default for *.exw programs, so that '? foo' outputs to the window. ----------------- MrTrick
4. Re: A nice window vs Win console
- Posted by Robert Craig <rds at RapidEuphoria.com> Jul 26, 2003
- 498 views
jondolar wrote: > As far as I understand, all output produced by Euphoria code that I > write goes to the Windows console...unless I code myself a window with > IDE for example and incorporate that code in my program and use special > procedures with things like SetPenPos, wPuts etc. to output my stuff on > a decent looking screen. This should be handled internally by euphoria > with a different parameter. With puts(4,x) for example, the 4 would > indicate that I want my output to a simple full screen window. > > What do you think of that Robert Craig I'll consider it, but maybe a user-contributed library like the one from Al Getz would be a better solution. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
5. Re: A nice window vs Win console
- Posted by jbrown105 at speedymail.org Jul 27, 2003
- 476 views
On Sat, Jul 26, 2003 at 09:43:43PM +1000, mistertrik at hotmail.com wrote: > > > >From: jondolar <lavigne.s at videotron.ca> > > > >As far as I understand, all output produced by Euphoria code that I > >write goes to the Windows console...unless I code myself a window with > >IDE for example and incorporate that code in my program and use special > >procedures with things like SetPenPos, wPuts etc. to output my stuff on > >a decent looking screen. This should be handled internally by euphoria > >with a different parameter. With puts(4,x) for example, the 4 would > >indicate that I want my output to a simple full screen window. > > > >What do you think of that Robert Craig > > > > Hear hear! > > I think that's a great idea, especially if it had a scrollbar when it > filled up. I'm running windows 98, and the DOS window's are very crappy. > Maybe even make it the default for *.exw programs, so that '? foo' outputs > to the window. > > ----------------- > MrTrick > For puts() and friends, you could just do this: global constant WINDOWHANDLE = -4 procedure oldputs(integer i, object x) puts(i, x) end procedure global procedure puts(integer handle, object x) if handle = WINDOWHANDLE then -- do the SetPos() and wPuts() stuff here else oldputs(handle, x) end if end procedure My basicio lib for linux does something similar. There is no way to wrap '? foo' tho, unless you wanna rewrite it into something like 'qmark(foo)'. It would be nice if there was a builtin routine that let us assign a routine id of a procedure that took one object as its only parameter to '?' like: procedure qmark(object x) .... set_builtin_qmark(routine_id("qmark")) Maybe it could only be called once even, so the second call to it would be an error...hmm. jbrown > > > TOPICA - Start your own email discussion group. FREE! > > -- /"\ ASCII ribbon | http://www.geocities.com/jbrown1050/ \ / campain against | Linux User:190064 X HTML in e-mail and | Linux Machine:84163 /*\ news, and unneeded MIME | http://verify.stanford.edu/evote.html ----- End forwarded message ----- -- /"\ ASCII ribbon | http://www.geocities.com/jbrown1050/ \ / campain against | Linux User:190064 X HTML in e-mail and | Linux Machine:84163 /*\ news, and unneeded MIME | http://verify.stanford.edu/evote.html
6. Re: A nice window vs Win console
- Posted by jbrown105 at speedymail.org Jul 27, 2003
- 506 views
On Sun, Jul 27, 2003 at 12:17:04PM -0400, jbrown105 at speedymail.org wrote: > > > On Sat, Jul 26, 2003 at 09:43:43PM +1000, mistertrik at hotmail.com wrote: > > > > > > >From: jondolar <lavigne.s at videotron.ca> > > > > > >As far as I understand, all output produced by Euphoria code that I > > >write goes to the Windows console...unless I code myself a window with > > >IDE for example and incorporate that code in my program and use special > > >procedures with things like SetPenPos, wPuts etc. to output my stuff on > > >a decent looking screen. This should be handled internally by euphoria > > >with a different parameter. With puts(4,x) for example, the 4 would > > >indicate that I want my output to a simple full screen window. > > > <snip> > > For puts() and friends, you could just do this: > > global constant WINDOWHANDLE = -4 <snip> I should also add that I chose to make WINDOWHANDLE -4 instead of 4 because 4 could be a valid file handle, but -4 cant be. jbrown -- /"\ ASCII ribbon | http://www.geocities.com/jbrown1050/ \ / campain against | Linux User:190064 X HTML in e-mail and | Linux Machine:84163 /*\ news, and unneeded MIME | http://verify.stanford.edu/evote.html