PDA

View Full Version : TAB Alpha Version 50



catventure
20-09-2009, 17:04
Hi,

A new (but small) update today.

20 Sep 2009 (Release 50)
========
*NEW. #minversion set to 1.7.9.0
*FIX. The issue with loading games or autoloading games with long intro and/or location descriptions in both Player and Editor is now fixed.
The Player was not appearing at all when such a game was run from the Editor version of Player - or an autorun game file run from the standalone Player itself.

It was a dialog callback issue solved with the use of a timer :)

http://tab.thinbasic.com/

Regards,
catventure

Petr Schreiber
20-09-2009, 18:43
Thanks for the announcement and congratulations on new version!

What kind of problem with dialog callback did you experienced, maybe it could be solved by handling proper message or something else?
If there is some bug in callback handling, better to report it rather than workaround and forget.


Petr

catventure
20-09-2009, 19:29
What kind of problem with dialog callback did you experienced, maybe it could be solved by handling proper message or something else?


Hi Petr,
It was simply that I was trying to do stuff to dialog controls that required user keypress BEFORE the dialog had actually been shown with %WM_INITDIALOG...
This resulted in the dialog window not appearing at all...

So I SPLIT the code into two bits and called the second bit using a timer AFTER the dialog was shown...



CASE %WM_INITDIALOG
'---Message fired at the very beginning when dialog is initialized
'---Attach menu to dialog
IF getplayername = 0 OR getplayername = 1 OR getplayername = 3 OR getplayername = 4 THEN
MENU ATTACH hMenu, hwnd
END IF
STATUSBAR_SETICON hwnd, %ID_STATUSBAR, 1, APP_SOURCEPATH + "icons\" + "Home.ico", 0
STATUSBAR_SETICON hwnd, %ID_STATUSBAR, 2, APP_SOURCEPATH + "icons\" + "Notes.ico", 0
STATUSBAR_SETICON hwnd, %ID_STATUSBAR, 3, APP_SOURCEPATH & "icons\" + "Pen.ico", 0
tm=0
dialog set timer hwnd,%id_timer,tm * 25
launch=1




CASE %WM_TIMER and launch=1
launch=0
tm=0
dialog kill timer hwnd,%id_timer
initialisation
initialdisplay
promptforinput


Therefore I do not think it a callback bug, Petr.

catventure.

Petr Schreiber
20-09-2009, 19:32
Thanks for the explanation,

I think it is ok then :)