>>Why not just the widow object instead of casting?
Because the calling function is CreateVOThread(...)
Here the Code:
******************
METHOD EditChange( oControlEvent ) CLASS Suchen
LOCAL oControl AS Control
LOCAL cKey AS STRING
LOCAL dwThreadID AS DWORD
LOCAL oSel AS Selection
oControl := IIF( oControlEvent == NULL_OBJECT, NULL_OBJECT, oControlEvent:Control )
SUPER:EditChange( oControlEvent )
IF oControl:NameSym == #SUCHE
cKey := Left(Upper(oDcSuche:CurrentText),1)
IF Instr("'",oDcSuche:CurrentText)
oSel := oDcSuche:Selection
oDcSuche:CurrentText := StrTran(oDcSuche:CurrentText,"'","")
oDcSuche:Selection := oSel
ENDIF
IF !Instr(cKey,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZÖÄÜ") .AND. Len(oDcSuche:CurrentText) == 1
oDcSuche:CurrentText := Stuff(oDcSuche:CurrentText,1,1,"")
ELSE
IF SELF:lREady
oDClbSuche:TextColor := Color{COLORBLACK}
dwThreadID := 1001
SELF:ptrThread := CreateVOThread(NULL_PTR,0, @SqlSearch(), PTR(_CAST, SELF), 0, @dwThreadID )
SELF:lREady := FALSE
ENDIF
ENDIF
ENDIF
RETURN
************************
Am Dienstag, 15. April 2014 17:08:43 UTC+2 schrieb Jamal: