Real Time Monitor Screen

IanC74

Member
Hi

I'm trying to create a real time monitoring screen for data that comes into our DB.

For example, a browse that constantly monitors (every 30 seconds or so or instantly) the status of a table (such as purchase orders). As soon as a new one is raised the browse updates with that information - so we see kind of a "latest 10 orders" in the browse.

Ill also be putting a stop button on the screen to stop this "Polling" method so that we can take a look at whats come in and print live reports.

My question therefore is has anyone done this. If I put the code in a normal style look that refreshes the browse Its impossible to press other buttons or use menu options as it locks everything up as its polling.

Any ideas?

Thanks in advance.

Ian
 

mrobles

Member
Hi.

Use the pstime control.
You can change the interval
chctrlframe-1:pstimer:interval = 60000. (miliseconds)
It fires a tick event each minute.
A cero value don't fire the tick event.

Note: It's not real time.
 

IanC74

Member
Hi

Ive tried the example of this from the progress knowledge base however when i try to create a button to do the interval I get the error message:

PROMSGS: Multi-level attribute references allowed only for com-handles. (5713)

I dont understand why the example gives it as Ive followed the example.

(FYI : The ID fo the example on PKB is 19064)

Any ideas?

Many thanks
Ian
 

Casper

ProgressTalk.com Moderator
Staff member
What is your progress version and what code is failing?

Regards,

Casper.
 

ttobba

New Member
What we have is a program that will allow a user to add items t list and when the user runs it will loop every 30 seconds and display the inventory present for that item. So in real time no, but it refreshes every 30 seconds so its as close as you going to get without having the screen flash with a list of parts and their inv levels. create a user work file for the user and store the parts that they want to add to. Can be applied to po aswell very easily.
 

mrobles

Member
Hi.

This program give you a good example.
 

Attachments

  • MARIO.wrx
    2.5 KB · Views: 20
  • MARIO.W
    11.9 KB · Views: 22

IanC74

Member
Firstly, thank you all so much for your help. I now have a working screen which updates every 30 seconds which is just what we needed.

However, I do stil have just one small issue (this only happens in our live environment and not when run from UIB), when the screen is "closed" (i.e. pressing the "X") I get the following error messages:

Invalid component-handle referenced while processing method/statement:pSTImer
USER-INTERFACE-TRIGGER <progname> (5884)

Incompatible data types in expression or assignment. (223)

The program closes but obviously I dont want to release the program to the users until I am rid of these errors. Is there something I am missing, such as closing the timer?

Thanks in advance
Ian
 

IanC74

Member
Well im even more confused know, the progress knowledge base says:

Cause:
Code to initialize the ActiveX Control was placed in the Main Block


Fixes:
Move the code that initializes the ActiveX Control to the initializeObject internal procedure after the RUN SUPER statement.


However, there is no code for the ocx except for from the main block?

Any ideas anyone?

Ian
 

mrobles

Member
Hi Ian

Maybe you are clossing the program while then tick event is executing.
I'll revise the code.

MRobles
 

mrobles

Member
Hi

I introduce code that use long time in the tick event and press the (X) and i recive the error.

This program corrects the problem.
It makes that if the tick event is working and you trie to stop the program, then send a message and reset the interval to cero.
I use a variable to see if the event is working and i modify 3 events
a) the choose of done buttom
b) the window close event
c) the tick event to set the variable when the event begins and reset to false when the event ends.

MRobles
 

Attachments

  • MARIO.W
    12.3 KB · Views: 22

IanC74

Member
Hmm seems like this problem is still happening, even with the tick event ending i still get the error message when closing the screen.

Any more idea anyone?

Thanks
Ian
 
Top