Haz Вот сырцы , но там все гладко как бы. Ведь работает же первые 5-10 минут нормально.
Если не клацать ни чего в бровсе и не ездить по нему , то обе таблички могут висеть хоть
целый день и ни чего не ломается. Но стоит интенсивно поездить по ним какое то время ,
бровс начинает жить своей жизнью и может сломать жизнь другим окнам и контролам в программе.
Скрытый текст __objAddData (oBrw3, 'nOldRecord' ) __objAddData (oBrw3, 'nNewRecord' ) __objAddData (oBrw3, 'nDellay' ) oBrw3:nDellay := 50 ... ... ... .... oBrw3:bChange := { || CheckRefresh(oBrw3) } // для главного бровса
|
*------------------------------------------------------
[pre2]
FUNC CheckRefresh( o )
IF ! _IsControlDefined ( o:cControlName + '_Timer', o:cParentWnd )
_DefineTimer ( o:cControlName + '_Timer' , o:cParentWnd , o:nDellay , { || OnChangeProcedure(o) } )
END
o:nNewRecord := o:nLogicPos()
RETURN NIL
*---------------------------------------------------
FUNC OnChangeProcedure( o )
if o:nOldRecord == o:nNewRecord
Myfilter(o,obrw4)
IF _IsControlDefined ( o:cControlName + '_Timer', o:cParentWnd )
Domethod( o:cParentWnd, o:cControlName + '_Timer' , 'Release')
ENDIF
endif
o:nOldRecord := o:nLogicPos()
RETURN NIL
*---------------------------------------------------------
Func MyFilter(o1,o2)
If o1:loBrw3Ready
Setproperty("SPR_REC","Message4","value","Загрузка данных.......")
Flogan('rid=='+ntoc((o1:cAlias)->rid) ,o2:cAlias) // серверный фильтр ADS
o2:Reset()
GetTotal(.t.,o2 )
Setproperty("SPR_REC","Message4","value",alltrim((o1:cAlias)->naim) )
Setproperty("SPR_REC","Message4","tooltip",alltrim((o1:calias)->prime))
Setproperty("SPR_REC","Message5","value",getuserfio() )
FreshFoots(o2)
if n_fltrecept==2
Setproperty(obrw3:cParentWnd,"Button_1","Enabled",FALSE)
endif
if kaka("recept") .or. idrec_user==(o1:calias)->n_user
obrw3:SetDeleteMode( if (n_fltrecept==2,.f.,.t.) ,.f.,{|| del_x:=(obrw3:calias)->rid,isdel(obrw3)} , {||ClearSpec(del_x) , x:=obrw3:bchange,obrw3:bchange:=nil,obrw3:Gotorec((obrw3:calias)->(recno())),obrw3:bchange:=x,eval(obrw3:bchange) } )
obrw4:SetDeleteMode( if (n_fltrecept==2,.f.,.t.) ,.f.,{|| if( (obrw4:calias)->itg==0,msgokCancel("Удалить "+alltrim(getspr(oBrw4,"naim"))+" ?","Внимание"),FALSE) },{|| Gettotal(.t.,obrw4),FreshFoots(obrw4)} )
Setproperty(obrw3:cParentWnd,"Button_2","Enabled",if(n_fltrecept==2,FALSE, TRUE) )
Setproperty(obrw3:cParentWnd,"Button_2","Enabled",if(n_fltrecept==2,FALSE, TRUE) )
Setproperty(obrw3:cParentWnd,"Button_3","Enabled",if(n_fltrecept==2,FALSE, TRUE) )
Setproperty(obrw4:cParentWnd,"Button_1x","Enabled",if(n_fltrecept==2,FALSE, TRUE) )
Setproperty(obrw4:cParentWnd,"Button_2x","Enabled",if(n_fltrecept==2,FALSE, TRUE) )
Setproperty(obrw4:cParentWnd,"Button_3x","Enabled",if(n_fltrecept==2,FALSE, TRUE) )
Setproperty(obrw4:cParentWnd,"Button_4x","Enabled",if(n_fltrecept==2,FALSE, TRUE) )
Setproperty(obrw4:cParentWnd,"Button_6x","Enabled",if(n_fltrecept==2,FALSE, TRUE) )
Setproperty(obrw4:cParentWnd,"Button_7x","Enabled",if(n_fltrecept==2,FALSE, TRUE) )
Setproperty(obrw4:cParentWnd,"Button_8x","Enabled",if(n_fltrecept==0,kaka("prnrecept"),.t. ))
else
obrw3:SetDeleteMode( .f.,.f.,{|| del_x:=(obrw3:calias)->rid,isdel(obrw3)} , {||ClearSpec(del_x) , obrw3:Gotorec((obrw3:calias)->(recno())) } )
obrw4:SetDeleteMode( .f.,.f.,{|| if( (obrw4:calias)->itg==0,msgokCancel("Удалить "+alltrim(getspr(oBrw4,"naim"))+" ?","Внимание"),FALSE) },{|| Gettotal(.t.,obrw4),FreshFoots(obrw4)} )
Setproperty(obrw3:cParentWnd,"Button_2","Enabled",FALSE )
Setproperty(obrw3:cParentWnd,"Button_3","Enabled",FALSE )
DoMethod ( "SPR_REC" , "Button_5" , 'Hide' )
Setproperty(obrw4:cParentWnd,"Button_1x","Enabled",FALSE )
Setproperty(obrw4:cParentWnd,"Button_2x","Enabled",FALSE )
Setproperty(obrw4:cParentWnd,"Button_3x","Enabled",FALSE )
Setproperty(obrw4:cParentWnd,"Button_4x","Enabled",FALSE )
Setproperty(obrw4:cParentWnd,"Button_6x","Enabled",FALSE )
Setproperty(obrw4:cParentWnd,"Button_7x","Enabled",FALSE )
Setproperty(obrw4:cParentWnd,"Button_8x","Enabled",if(n_fltrecept==0,kaka("prnrecept"),.t. ))
endif
endif
return nil
*--------------------------------------------------------
func Flogan(ceri,alik)
hb_default(@alik,alias())
if (alik)->(Rddname())=="ADSCDX"
(alik)->(AdsSetAof(ceri,2))
else
(alik)->(dbsetfilter({|| &(ceri)},ceri))
endif
return nil
*---------------------------------------------------------
`
Вот видео что выслал клиент.
Я позже у себя тоже плотно поюзал и выпал на похожие глюки (писал выше)
Скрытый текст