From: Willie Moore on
Bob,

in your postinit, add this after your SetTimer()
SELF:Timer()

Regards,
Willie

"ciderbob" <bobmcc03(a)gmail.com> wrote in message
news:37b11d4b-5b0f-4dad-9264-3ea0b774c5a6(a)n35g2000yqm.googlegroups.com...
> On Nov 27, 10:50 am, ciderbob <bobmc...(a)gmail.com> wrote:
> in postinit()
> SetTimer(self:handle(),1,100,null_ptr)
>
> METHOD dispatch(oevent) CLASS waitwin
> ? oevent:message
> RETURN SUPER:dispatch(oevent)
>
> Rest of the message
>
> Here is the output from the dispatch
>
> 295
> 296
> 13
> 12
> 70
> 131
> 71
> 131
> 12
> 70
> 71
> 3
> 70
> 71
> 28
> 134
> 6
> 641
> 642
> 7
> 8
> 641
> 12
> 24
> 70
> 133
> 20
> 71
> 31
> 10
> 528
> 20
> 70
> 71
> 134
> 6
> 28
> 2
> 70
> 131
> 71
> 295
> 296
> 13
> 12
> 70
> 131
> 71
> 131
> 12
> 70
> 71
> 3
> 70
> 134
> 6
> 641
> 642
> 7
> 8
> 641
> 12
> 24
> 70
> 133
> 20
> 71
> 31
> 10
> 528
> 20
> 70
> 71
> 134
> 6
> 2
> 70
> 131
> 71
> No WM_TIMER ( 275) sent
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4642 (20091127) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4642 (20091127) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



From: ciderbob on
Still no timer event message sent.

Does the window's owner have anything to do with timer events?

From: Willie Moore on
Bob,

I sent you a sample to your hotmail address. I also posted the sample on the
Grafx .Public.VO.General NG. Please let me know if it works.

Regards,
Willie




__________ Information from ESET NOD32 Antivirus, version of virus signature database 4643 (20091127) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



From: John Martens on
Bob,

Would something like this work if you call MyOwnTimer from PostInit ?

METHOD MyOwnTimer(fWachtSeconds AS FLOAT)
LOCAL fStartSeconds AS FLOAT
fStartSeconds := Seconds()
DO WHILE .not. SELF:EndTheTimer
DO WHILE fStartSeconds+fWachtSeconds > Seconds()
ApplicationExec(EXECWHILEEVENT)
ENDDO
IF .not. SELF:EndTheTimer
SELF:DoMyTimerThing()
ENDIF
ENDDO
RETURN

John



ciderbob schreef:
> I am using SetTimer(self:handle(),1,100,null_ptr) in a data window to
> display progress of the window in VO 2.8sp2
> CLASS waitwin INHERIT DATAWINDOW
>
> EXPORT oDCctext AS FIXEDTEXT
>
> //{{%UC%}} USER CODE STARTS HERE (do NOT remove this line)
> EXPORT pbrect,opie,npos:=0 ,cpos:=0
> PROTECT nl
> PROTECT xc
> PROTECT yc
> PROTECT x
> PROTECT y
> PROTECT c
> PROTECT oline
> PROTECT a
> PROTECT r
> PROTECT rgb
> PROTECT i
> PROTECT j
> PROTECT p
> PROTECT cnt
> PROTECT angle
> PROTECT nstep
>
> method Init(oWindow,iCtlID,oServer,uExtra) class waitwin
> local dim aFonts[1] AS OBJECT
> local dim aBrushes[1] AS OBJECT
>
> self:PreInit(oWindow,iCtlID,oServer,uExtra)
>
> super:Init(oWindow,ResourceID{"waitwin",_GetInst()},iCtlID)
>
> aFonts[1] := Font{,10,"Technical"}
> aBrushes[1] := Brush{Color{219,219,219}}
>
> oDCctext := FixedText{self,ResourceID{WAITWIN_CTEXT,_GetInst()}}
> oDCctext:Font(aFonts[1], FALSE)
> oDCctext:TextColor := Color{255,0,0}
> oDCctext:HyperLabel := HyperLabel
> {#ctext,NULL_STRING,NULL_STRING,NULL_STRING}
> oDCctext:BackGround := aBrushes[1]
>
> self:Caption := "Please wait"
> self:HyperLabel := HyperLabel{#waitwin,"Please
> wait",NULL_STRING,NULL_STRING}
> Self:BackGround := aBrushes[1]
>
> if !IsNil(oServer)
> self:Use(oServer)
> endif
>
> self:PostInit(oWindow,iCtlID,oServer,uExtra)
>
> return self
>
> METHOD PostInit(oWindow,iCtlID,oServer,uExtra) CLASS waitwin
> LOCAL i,j
> nl:=SELF:size:height/2 // 30
> xc:=SELF:size:width/2 //100
> yc:=65
> x:=ARRAY(nl)
> y:=ARRAY(nl)
> c:=ARRAY(nl)
> a:=ARRAY(nl)
> r:=25
> rgb:=192
> p:=ARRAY(nl)
> cnt:=1
> angle:=90
> nstep:=-5
> SELF:origin:=centerscreenwin(SELF)
> SELF :EnableSystemMenu(FALSE)
> SetTimer(SELF:handle(),1,10,NULL_PTR )
> SELF:odcctext:caption:=AsString(uextra)
> FOR i:=1 TO nl
> j:=rgb/nl*(i-1)
> c[i] := Pen{Color{j,j,j}, LINESOLID, 1}
> NEXT
> SELF:background:=brush{color{rgb,rgb,rgb}}
> SELF:odcctext:background:= brush{color{rgb,rgb,rgb}}
> c[nl] := Pen{Color{rgb,rgb,rgb}, LINESOLID, 1}
> AltD()
> RETURN NIL
>
>
>
> METHOD dispatch(oe) CLASS waitwin
> LOCAL i ,j
> IF oE:message == WM_TIMER .AND. oE:wParam == 1
> AltD()
> oprinter:idle()
> FOR j:=nl-1 TO 1 STEP -1
> IF y[j] != NIL
> x[j+1]:=x[j]
> y[j+1]:=y[j]
> ENDIF
> NEXT
> a[cnt]:=angle
> x[1] := (Cos(3.14159/180*a[cnt]) * r ) + xc
> y[1] := (Sin(3.14159/180*a[cnt]) * r) + yc
> p[1] := c[1]
> cc:=nl
> FOR j:=1 TO nl
> IF y[j] != NIL
> oline:=LineObject{point{xc,yc},point{x[j],y[j]},c[j])
> SELF:draw(oline)
> ENDIF
> cc--
> NEXT
> cnt++
> cnt:=if(cnt>nl,1,cnt)
> IF i==-270
> I:=90
> ENDIF
> SELF:angle-=5
> SELF:angle:=if(SELF:angle<-270,90,SELF:angle)
> ENDIF
> RETURN SUPER:dispatch(oe)
>
>
> It works fine in 2.7 but in 2.8 the dispatch never receives the
> WM_TIMER in the event
>
> It's most likely somthing obvious but it has me flummoxed
>
> TIA
>
> Bob McCutcheon
From: Geoff Schaller on
Bob,

You are going around in circles.
Create the sample aef and post it.

Geoff


"ciderbob" <bobmcc03(a)gmail.com> wrote in message
news:73305113-cd80-422a-a685-17ec38f7625b(a)h2g2000vbd.googlegroups.com:

> I have used settimer in numerus apps and never had a problem. As is
> said it works fine in 2.7 but 2.8 is messing with me. I have tried
> trapping it with debug to look at the messages but WM_TIMER is never
> sent.