[Gambas-user] gb3+sdl: Screen object not created and screen events don't trigger

Kevin Fishburne kevinfishburne at ...1887...
Sun Mar 6 05:34:12 CET 2011


On 03/05/2011 10:36 PM, Kevin Fishburne wrote:
> I have a module, Render, with the following:
>
> ...
>
> The procedure Screen_Draw should be triggered as an event automatically,
> yet it is not. When manually calling it I get a "No device" error when
> it tries to write to the screen via Draw.Image(...). Double-clicking the
> "Screen" object in the variable declaration states "Unknown symbol".
> BeastScroll works fine, even using the same components as the app that
> fails (gb, gb.image, gb.image.effect, gb.image.imlib, gb.image.io,
> gb.net, gb.sdl, gb.sdl.sound). It's almost like it thinks the
> declaration "Public Screen As New Window As "Screen"" is a joke or
> something. :/

Okay, I made a copy of the app and ripped it up with no mercy. 
Apparently "WAIT x" and "WAIT" do not allow the Draw event to trigger 
for the screen/window. Looks like the Screen_Draw procedure will have to 
contain code from the main loop in order for the screen to refresh. 
While this shouldn't be a big problem for me to adjust to, is this a bug 
or oversight? I'm guessing the Screen.Show method is what starts the 
Draw event triggering, but I'm just guessing. SDL is definitely 
different than traditional GAMBAS drawing logic.

-- 
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sales at ...1887...
phone: (770) 853-6271





More information about the User mailing list