1. An idea that isn't working
- Posted by "Bruce M. Axtens" <zaphod_beeblebrox at SIL.ORG> Nov 11, 1999
- 483 views
Dear Eu-people The code below isn't working and I imagine it should. Having set the rows to 50 why can't I position at 50? It fails under VirtualPC and under NT4 SP4. ZB ---------------- test2.exw -------------------- include graphics.e integer r r = text_rows( 50 ) position( 50, 1 )
2. Re: An idea that isn't working
- Posted by Adam Weeden <theskaman at NETZERO.NET> Nov 11, 1999
- 476 views
Because the screen starts at 0 so position 50 is actually 49. Adam Weeden ----- Original Message ----- From: Bruce M. Axtens <zaphod_beeblebrox at SIL.ORG> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Thursday, November 11, 1999 2:17 PM Subject: An idea that isn't working > Dear Eu-people > > The code below isn't working and I imagine it should. Having > set the rows to 50 why can't I position at 50? > > It fails under VirtualPC and under NT4 SP4. > > ZB > ---------------- test2.exw -------------------- > > include graphics.e > > integer r > r = text_rows( 50 ) > position( 50, 1 ) > __________________________________________ NetZero - Defenders of the Free World Get your FREE Internet Access and Email at http://www.netzero.net/download/index.html
3. Re: An idea that isn't working
- Posted by Rolf Schroeder <schroeder at DESY.DE> Nov 11, 1999
- 459 views
Bruce M. Axtens wrote: > Dear Eu-people > > The code below isn't working and I imagine it should. Having > set the rows to 50 why can't I position at 50? > > It fails under VirtualPC and under NT4 SP4. > > ZB > ---------------- test2.exw -------------------- > > include graphics.e > > integer r > r = text_rows( 50 ) > position( 50, 1 ) > Adam Weeden wrote: > Because the screen starts at 0 so position 50 is actually 49. > > Adam Weeden I write: text_row() is for lines 1 to 50, not 0 to 49. Try this and it works: ---------------------------------------------------------- include graphics.e include get.e -- wait_key() integer r r = text_rows( 50 ) position( 50, 1 ) puts(1,"Hello!")-- place this in 50th row... r = wait_key() -- wait here to watch the 50-row-screen! ---------------------------------------------------------- Have a nice day, Rolf
4. Re: An idea that isn't working
- Posted by Rolf Schroeder <schroeder at DESY.DE> Nov 11, 1999
- 458 views
Hi Bruce, now I got the point you mean: your example will run in the CMD-window of WIN32 as a *.ex-file, not as a *.exw-file. This has to do with the opening of a standard DOS-window not capable of more then 25 rows. Rob, could you reflect on this point? Have a nice day, Rolf
5. Re: An idea that isn't working
- Posted by Robert Craig <rds at ATTCANADA.NET> Nov 11, 1999
- 461 views
Bruce M. Axtens writes: > The code below isn't working and I imagine it should. Having > set the rows to 50 why can't I position at 50? > It fails under VirtualPC and under NT4 SP4. > ---------------- test2.exw -------------------- > > include graphics.e > > integer r > r = text_rows( 50 ) > position( 50, 1 ) Euphoria creates a Windows console for your program whenever you do something that needs one. In this case, no console existed at the time that you called text_rows(), so it failed and returned 25. This is a bug. text_rows() should create a console if necessary. It will be fixed in the next release. Meanwhile, you should be able to work around this bug by doing any of the following before you call text_rows(50): * print something to the screen * clear_screen() * if graphics_mode(3) then end if clear_screen() seems like the simplest fix. This fixed the problem for me on Win98. I assume it will work on NT as well. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com