Posted: Wed Feb 29, 2012 8:50 am Post subject: is there a way to find out if "offscreenonly" is enabled?
What is it you are trying to achieve?
a color fading module
What is the problem you are having?
my computer cant draw it fast enough, so it looks really crappy in a loop
Is there a function that tells you if offscreenonly is on?
Describe what you have tried to solve this problem
the documentation keeps saying "Navigation to webpage was cancelled"
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>
Turing:
var see_below :string:="look at the attachment"
Please specify what version of Turing you are using
<Answer Here>
Posted: Wed Feb 29, 2012 12:49 pm Post subject: Re: is there a way to find out if "offscreenonly" is enabled?
Well, there is no way of determining if an output window is in offscreenonly mode.
But, you could create a separate window ad keep it hidden. Then you just have to draw your gradient to the hidden window, then copy the contents of that window to the window the user sees.
Posted: Wed Feb 29, 2012 4:10 pm Post subject: RE:is there a way to find out if "offscreenonly" is enabled?
Since only your code will determine if the buffer is offscreen or not, why not just manage a boolean yourself? Tip: Make a procedure to set the variable and call View.Set(...).
copthesaint
Posted: Wed Feb 29, 2012 4:17 pm Post subject: RE:is there a way to find out if "offscreenonly" is enabled?
Its very easy to know if a screen is offscreenonly. If you havnt set offscreenonly then it is Initialized as nooffscreenonly
Velocity
Posted: Wed Feb 29, 2012 6:57 pm Post subject: RE:is there a way to find out if "offscreenonly" is enabled?
you type View.set ("offscreenonly") if you typed it... its there no doubt. assuming you placed it at the very top of your function that you want it to be used for.
Tony
Posted: Wed Feb 29, 2012 7:17 pm Post subject: Re: RE:is there a way to find out if "offscreenonly" is enabled?
Zren @ Wed Feb 29, 2012 4:10 pm wrote:
Since only your code will determine if the buffer is offscreen or not...
Not if other people are using your library/package/whatever
Posted: Wed Feb 29, 2012 11:20 pm Post subject: RE:is there a way to find out if "offscreenonly" is enabled?
- if the dot gets drawn, it means offscreen is false.
- the screen could have already been black from before, so you'd need to draw twice, and look for that transition
-- which also means that if there's a forked thread, this is not deterministic (which is why forks and offscreenonly don't go together)
Of course you'd have to confirm that whatdotcolor actually reads from screen and not from the buffer into which offscreen draws.
- if the dot gets drawn, it means offscreen is false.
- the screen could have already been black from before, so you'd need to draw twice, and look for that transition
-- which also means that if there's a forked thread, this is not deterministic (which is why forks and offscreenonly don't go together)
Of course you'd have to confirm that whatdotcolor actually reads from screen and not from the buffer into which offscreen draws.
If i rember correctly whatdotcolor and pic.new read from the buffer and not the screen.
Computer Science CanadaHelp with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Velocity
Posted: Thu Mar 01, 2012 12:15 am Post subject: RE:is there a way to find out if "offscreenonly" is enabled?
pic.new reads from buffer, whatdotcolor reads from screen
Dan
Posted: Thu Mar 01, 2012 2:06 am Post subject: Re: RE:is there a way to find out if "offscreenonly" is enabled?
Velocity @ 1st March 2012, 12:15 am wrote:
pic.new reads from buffer, whatdotcolor reads from screen
Notice that you will get the same output with "nooffscreenonly", making this method unhelpfull for detecting if "offscreenonly" is on (i.e. evildaddy911's code will allways return true).
Computer Science CanadaHelp with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Velocity
Posted: Thu Mar 01, 2012 3:27 pm Post subject: RE:is there a way to find out if "offscreenonly" is enabled?
hmm, thats odd. When i tested it, it begged to differ. Oh well, i guess there was something wrong with the way i wrote it. So ofcourse ill take your word over my compilers. Thanks for the clear up, dan.
Dan
Posted: Thu Mar 01, 2012 6:52 pm Post subject: Re: RE:is there a way to find out if "offscreenonly" is enabled?
Velocity @ 1st March 2012, 3:27 pm wrote:
hmm, thats odd. When i tested it, it begged to differ. Oh well, i guess there was something wrong with the way i wrote it. So ofcourse ill take your word over my compilers. Thanks for the clear up, dan.
What was your code? And what does your complier output for the same code i posted?
Computer Science CanadaHelp with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Velocity
Posted: Fri Mar 02, 2012 12:07 am Post subject: RE:is there a way to find out if "offscreenonly" is enabled?