Hi all,
My "About..." dialog's User Item does not work until the main event loop
(HANDLEEVENTS) has been executed. Can someone help me find the "bug"? I have
run out of patience with this one.
My program calls the function "ShowAbout" (see code below) prior to entering
the main event loop and all dialog items show up except the text printed to
the User Item.
However, if the same function is called from my "doMenu" routine, everything
is just fine.
'// =========== beginning of code ==========================
LOCAL FN ShowAbout
DIM dlog&, itemType%, itemH&, ItemRect;8
DIM itemHit%
dlog& = FN GETNEWDIALOG (_dlogAbout, 0, -1)
LONG IF dlog&
CALL DRAWDIALOG (dlog&) : CALL SETPORT (dlog&)
CALL SELECTWINDOW (dlog&)
CALL GETDITEM (dlog&, _dlogItemUserInfo, itemType%, itemH&, itemRect)
TEXT _geneva, 9, 0 : COLOR = _zBlack
PRINT% (itemRect.left+10, itemRect.top+30) "Registered to: "; gRegTo$;
PRINT% (itemRect.left+10, itemRect.top+45) "Serial Number: ";
gSerialNum$;
DO
CALL MODALDIALOG (0, itemHit%)
UNTIL itemHit%
CALL DISPOSDIALOG (dlog&)
END IF
END FN
"MAIN"
'// CHECK FOR REGISTRATION
reg$ = FN GetRegistration$
sn$ = FN GetSerialNumber$
LONG IF (FN ValidSerialNum%(sn$))
gRegTo$ = reg$
gSerialNum$ = sn$
FN ShowAbout :' <--------- text in user item does not
show
XELSE
gRegTo$ = ""
gSerialNum$ = ""
FN ShowAboutDemo
END IF
FN InitGlobals
FN InitMenus
ON DIALOG FN doDialog
ON MENU FN doMenu :' <--------- text in user item okay when
:' FN
ShowAbout called from here
DO
HANDLEEVENTS
UNTIL done%
'// =========== end of code ==========================
Thanks in advance for any pointers.
_Chris