Why would PSTimer not work when run from a shortcut when it

Posted by BeezBros on 16-Mar-2011 04:37

Hi guys

I have created a smart window today... set out a few standard controls like fill ins, buttons and an editor. Then I added a PSTimer OCX because this is a processor that has to periodically check for new records in the database. Mind you I have gotten that far yet.

The first step was just to set up the timer to give me a message to say it was running the first time it fired.

Hit F2 in the AppBuilder and it works fine.

My app has a standard .p to run programs from a shortcut (called RunWindow.p). The .p loads the program (in this case the smart window) persistently, sets a handle and then runs a local-initialize procedure to get it going. When I try to run the exact same smart window code from a shortcut (through the RunWindow.p) the timer does not seem to fire (i.e. I do not get any message).

I think there has to be something I need to fire in order to get the timer loaded and enabled... but having trouble with the limited help available for PSTimer.

Has anyone come across a similar issue or has any suggestions for me on what I am doing wrong?

Cheers

Craig

(OE 10.1B.02, Windows 7)

All Replies

Posted by Peter Judge on 16-Mar-2011 07:34

Is there a WAIT-FOR active? The AppBuilder always has one, but that may not be true when running the .W (persistently or non-persistenly, I can't remember) from the Procedure Editor.

-- peter

Posted by BeezBros on 17-Mar-2011 03:37

Thanks Peter... you put me on the right track. My .p had a wait-for... but the persistent .w (with the pstimer in it) did not (unless run from the UIB).

So your tip has made me rethink the design. Now I run a .w from the the windows shortcut and all that has in it is really the pstimer. That then runs the next window persistently and the pstimer tick runs a procedure in the persistent window... works a treat.

Thank you so much for your help.

Cheers

Craig

This thread is closed