Odd Issue

Monkey Forums/Monkey Programming/Odd Issue

XanthorXIII(Posted 2011) [#1]
Hello,
I'm getting started with Monkey and I was following the Path of Monkey Tutorial. I try to copy the first code and while it executes, I just get a white screen on the HTML Page. All other Tutorials provided work except this one.


Strict

Import mojo.app

Import mojo.graphics

 

Function Main:Int()

       New BlueScreen

End

 

Class BlueScreen Extends App

       Method OnRender:Int()

              Cls 0,0,200

              DrawText "You got a bluescreen",200,200

              Return 0

       End Method
End



dopeyrulz(Posted 2011) [#2]
You probably need to SetUpdateRate(60) in OnCreate


therevills(Posted 2011) [#3]
You probably need to SetUpdateRate(60) in OnCreate


When Im quickly testing something I almost always forget to do this! It would be nice if Mojo did this for you...


dopeyrulz(Posted 2011) [#4]
Was thinking the same myself when looking at this. Make it more of an override if you want to change it.


XanthorXIII(Posted 2011) [#5]
Tested and works. In Demo which was version 30 I didn't have to do the OnCreate Method and set update rate. Not a problem, but the documentation for Monkey needs to be updated to indicate that. Cool, glad I got over that hump.


Loofadawg(Posted 2011) [#6]
Since this is not a bug per say, but rather a documentatation issue... Hmmm... Maybe we need a kind of Monkey wiki that the users can submit clarifications and examples in order to lessen some of the frustration. The tutorials included with Monkey do a good job at trying to get the users up to speed, and I really appreciate all the time spent to create them.

There is always a learning curve and Monkey is no exception. Thankfully, the Blitz community is a strong one full of helpful individuals. Big thanks to everyone.


XanthorXIII(Posted 2011) [#7]
Yeah something has changed between versions. No biggie, I figured someone would have the answer which was the case. I can see that there have been some updates in that particular tutorial.
I'll get the hang of it.
Thanks!