How can I insert a timer in an existing programm?

Andi9383

New Member
Hello,

I want to insert a timer in an existing programm with the editor under openedge10. AppBuilder dont work.

can somebody help me?

thanks
andi
 

bulklodd

Member
PKB says

ID: P75607
Title: "Should ActiveX controls only be created via the AppBuilder?"
Goals:
Should ActiveX controls only be created via the AppBuilder?

Fixes:
Yes, the External Program Interfaces manual states the following:
In Progress, you must use the AppBuilder at design time to create instances of ActiveX controls in your application.

but i suppose there're ways to do it without ab. Anyway all you need is to create wrx file for PSTimer object using AB and then use it in your program without AB.
 

Andi9383

New Member
Tanks,

it is possible, you must kick all rows from your code which appbuilder dont like, than open file with appbuilder, create a timer, save that, open file with editor, insert all kicked rows and correct all the monkey business that the appbuilder had made with your code.:awink:
 

joey.jeremiah

ProgressTalk Moderator
Staff member
i've attached a simple timer library, showing an example use of
pstimer.ocx that doesn't require using the appbuilder.

i didn't know how portable the wrx file (controls definition file) would
be. so you'll still need to use the appbuilder to create your own wrx file.

the wrx file name needs to be pstimer.wrx (placed on the propath) and
control-frame name "CtrlFrame". it can be changed in the timer.p proc.


heres a example using the attached timer library

Code:
{timer.i} /* timer library include */
 
 
 
define var t as int no-undo.
 
t = setTimeout( "displayTime", this-procedure, 1000 ).
t = setTimeout( "displayTime", this-procedure, 5000 ).
t = setTimeout( "displayTime", this-procedure, 10000 ).
 
 
 
display
    "The proc will show the time" skip
    "1 sec, 5 sec and 10 sec from now" string( time, "hh:mm:ss" ).
 
wait-for window-close of current-window.
 
 
 
procedure displayTime:
 
    display string( time, "hh:mm:ss" ).
 
end procedure. /* displayTime */
hth :)
 

Attachments

  • timer.zip
    2.1 KB · Views: 90
Top