This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Nicba1010's profile picture

Window API Problems :(

Started by Nicba1010, 13 July 2014 - 02:00 PM
Nicba1010 #1
Posted 13 July 2014 - 04:00 PM
So, I've benn doing some work, been trying to make a storage program.
Full src: http://pastebin.com/Ru3A2nFe
But, when I do this

alertWindows[par1].setVisible(false)
alertWindows is a window array

It simply does not hide it!
But I can write to it, change text color…
Please help me
Sincerely, Roberto
jf908 #2
Posted 13 July 2014 - 06:01 PM
Using .setVisible(false) does not actually undraw your window as it says on the wiki page.

You have to draw something over the top of it for it to disappear.
KingofGamesYami #3
Posted 13 July 2014 - 07:12 PM
I believe setVisible does not erase the on screen characters, it simply stops farther renders.

alertWindows[par1].write( "hello" )  --#writes hello
alertWindows[par1].setVisible( false )  --#does nothing visible
alertWindows[par1].write( "world" )  --#does nothing visible

However, if you have another window below it you want to see, you can use window.redraw()