Page 1 of 1

dc_waiton() modal

Posted: Wed Jun 01, 2016 11:02 pm
by c-tec
Hello,
when setting to non modal, I get an runtime error in the latest version:

Code: Select all

dc_waiton( cMessage,  , , , , , , , , .f.)
oError:args :
-> VALTYPE: O CLASS: DC_XbpDialog1
-> VALTYPE: O CLASS: XbpIWindow
-> VALTYPE: L VALUE: .F.
-> VALTYPE: A VALUE: {680.00, 300.00}
-> VALTYPE: A VALUE: {560, 480}
-> VALTYPE: U VALUE: NIL
-> VALTYPE: L VALUE: .T.
oError:canDefault : N
oError:canRetry : N
oError:canSubstitute: J
oError:cargo : NIL
oError:description : Parameter has a wrong data type
oError:filename :
oError:genCode : 2
oError:operation : :Init
oError:osCode : 0
oError:severity : 2
oError:subCode : 1025
oError:subSystem : BASE
oError:thread : 6
oError:tries : 0
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Called from XBPDIALOG:INIT(486)
Called from DC_XBPDIALOG1:INIT(12805)
Called from DC_GETLIST:INIT(740)
Called from DC_READGUI(110)
Called from DC_WAITON(566)


regards
Rudolf

Re: dc_waiton() modal

Posted: Thu Jun 02, 2016 6:13 am
by rdonnay
This is very strange that this would suddenly start happening.

There have been no changes to that code in many releases.

I found a fix (_DCGETBX.PRG) :

Code: Select all

METHOD DC_XbpDialog1:Init(oParent,oOwner,aPos,aSize,aPresParam,lVisible)

LOCAL oThread := ThreadObject()

::lCreated := .F.

IF oThread:isDerivedFrom('DC_Thread')
  oThread:xbp := self
ELSEIF Empty(oThread:cargo)
  oThread:cargo := self
ENDIF

::nXOffset := 90

Sleep(5)  <<<<<<<< ADD THIS

RETURN ::xbpDialog:Init(oParent,oOwner,aPos,aSize,aPresParam,lVisible)