Re: An idea that isn't working

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu