
-----------------------------------
Michael
Thu Oct 05, 2006 6:18 pm

my program just wont clear screen
-----------------------------------
im sure this shouldnt be too hard to fix..
im sorry i had to put this file in a zip because there are so many pics..

when u click on question1.. it goes to the question but it just wont cls 
i dont understand whats wrong 

look in the mainline..



    if x > 99 and x < 201 and y > 239 and y < 270 and button = 1 then
        cls
        question1
    end if




question1 is a procedure.. 

if i get rid of the procedures and do something like 




 if x > 99 and x < 201 and y > 239 and y < 270 and button = 1 then
        cls
        put "blah"
        exit
    end if

then it works 
but i gotta use procedures 

 i tried clsing the actuall procedure...  exit statements and what not .. nothing works

-----------------------------------
shoobyman
Thu Oct 05, 2006 6:31 pm


-----------------------------------
you probably forgot to put a view.update as usual

-----------------------------------
Michael
Thu Oct 05, 2006 6:50 pm


-----------------------------------
why dont u check the program first......................

-----------------------------------
shoobyman
Thu Oct 05, 2006 6:56 pm


-----------------------------------
y don't you make me?  :twisted:

-----------------------------------
shoobyman
Thu Oct 05, 2006 7:00 pm


-----------------------------------
when you set the View.Set ("graphics:400;400"), it acts like the setscreen ("offscreenonly") thing, so you did have to put a View.Update

try it

-----------------------------------
Michael
Thu Oct 05, 2006 7:13 pm


-----------------------------------
well the view.update is already there ..

the problem is that i should put offscreenonly in a seperate command... that might work.. i'll try iy when i get back 2 my computer


see private message

-----------------------------------
LaZ3R
Thu Oct 05, 2006 10:23 pm


-----------------------------------
You have to stick a bunch of View.Updates in your program because you're using the setscreen ("offscreenonly") which simply does all the graphics stuff offscreen... only... and then you need to call the program to bring up the graphics and text.

I see no view updates in the right place. You have to put it inside, everywhere after all the graphics and text have been called out, but also before the program requires user input. I'll help you tomorrow in class :p.

-----------------------------------
Clayton
Thu Oct 05, 2006 10:36 pm


-----------------------------------

You have to stick a bunch of View.Updates in your program...


no, no, no, and no again, your program should only ever have one (maybe two for humongous programs) View.Update in it. That being said, even inserting the View.Update(s) will not help your program, i think that it may have something to do with your Pic.ScreenLoad(ing) statements (which you should probably use Pic.New and Pic.Draw for instead, as it is mucho grande faster).

-----------------------------------
Clayton
Thu Oct 05, 2006 10:37 pm


-----------------------------------

You have to stick a bunch of View.Updates in your program...


no, no, no, and no again, your program should only ever have one (maybe two for humongous programs) View.Update in it. That being said, even inserting the View.Update(s) will not help your program, i think that it may have something to do with your Pic.ScreenLoad(ing) statements (which you should probably use Pic.New and Pic.Draw for instead, as it is mucho grande faster).

Look into the Turing Walkthrough for some excellent quality tuts written by members here, take a good look at the Picture tut and the View.Set and View.Update tutorial

-----------------------------------
BenLi
Fri Oct 06, 2006 8:26 am


-----------------------------------
You have to stick a bunch of View.Updates in your program because you're using the setscreen ("offscreenonly") 

Yeah I agree with freakman, the whole point of offscreenonly is to refresh only once for everytime you draw the whole screen. spamming View.Update doesn't do anything

Also its a stylistic issue. In large programs, you should organize everything into subroutines and put those in a loop and only View.Update in the main loop. Also, following this style you should have as little global variables as possible
