problem with when-timer-expired and cursor position [message #265506] |
Thu, 06 September 2007 08:26  |
petku
Messages: 10 Registered: September 2007
|
Junior Member |
|
|
Hi
I have a multi-record-block and want update one item (item A, not a database item) of this block every second.
To do that, for each record in the block I have to read the values of another item (item B) and do some sql to retrieve the new value for item A.
The problem is: To get the value of item B I navigate to this field. When a user writes text and the timer fires the change of the position disturbs the user.
Is there any way to navigate through a block without change the cursor position?
Thanks for answers!
Peter
|
|
|
|
|
|
|
|
Re: problem with when-timer-expired and cursor position [message #267737 is a reply to message #267612] |
Fri, 14 September 2007 08:47   |
petku
Messages: 10 Registered: September 2007
|
Junior Member |
|
|
Hello David,
You asked:
<However, I reread your posts and I need to know "Is it your intention to update values on the screen while the user is trying to key data into another field?">
Yes this is my intention.
To express this more concretely:
The block shows which container are on a conveyor belt. For each container there is one record in the block. The container-ID I called 'item A'. Some items in the record are calculated: In the record I show the position of the container on the conveyor belt (I called 'item B').
While the user is doing some work, I have to update the container position (item B) cyclic. The number and the ID of the container are fix, only the position is changing.
So far I do this with a post-query-trigger and execute_query. Before I change the block I store the actual cursor position in a global variable and move the cursor after updating back to this item. Additional I set the item attribute KEEP_POSITON = YES of every text item.
But it would be better to update without changing the cursor position!
regards,
Peter
|
|
|
|
Re: problem with when-timer-expired and cursor position [message #268709 is a reply to message #268204] |
Wed, 19 September 2007 07:48   |
petku
Messages: 10 Registered: September 2007
|
Junior Member |
|
|
Hi David,
I see there is no other way as to move the cursor.
It would be nice if something like that exists in forms:
itemvalue := :blockname.record(recordnumber).itemname;
But access to the records in a block is possible only with cursor operations (go_block, next_record etc.)
Regards,
Peter
|
|
|
|
Re: problem with when-timer-expired and cursor position [message #269037 is a reply to message #268828] |
Thu, 20 September 2007 09:09   |
petku
Messages: 10 Registered: September 2007
|
Junior Member |
|
|
Hi David,
unfortunately the number of recored in the block changes.
The user work with an order which consists of perhaps two container. Then he changes the order number an the new order consists of perhaps ten container. In this case I use a slider because only five records are visible at the same time.
Two forms would be possible but to arrange these forms on the screen is not so easy, isn´t it?
Peter
|
|
|
|
|