Another Edit Table Question (OpenInsight Specific)
At 03 NOV 1998 11:20:16PM Greg James, ISIS, Inc. wrote:
I use a promoted POSCHANGED event to make the column 1 cell active in the row that the cursor moves to. For example, if the cursor is in column 3, row 2 and the user presses the up arrow to move to row 1, the column 1, row 1 cell becomes active.
This seems to work fine except when there is a validation routine for a cell. When this is the case the validation only works when the enter key is pressed, not when an arrow key is pressed.
What is the difference to OI between POSCHANGED being called because of enter versus an arrow key? Is there a way to do what the enter key does (using basic+) when an arrow key is pressed?
Thanks.
At 04 NOV 1998 01:51AM Andre P. wrote:
I've got a form with a large edit table and I have logic that gets executed when the user strikes the enter key or any of the arrow keys.
I'm sending the poschanged event to the omnievent. From there I just extract the position that I need and based on the column or row, I use GoSub's to execute any logic that I need.
Here's a sample.
POSCHANGED_TABLE:
cell=Get_Property(@Window:".TABLE","SELPOS")
column=field(where,@FM,1)
Begin Case
Case whereat=1'GoSubCase whereat=2'GoSubEnd Case
Hope this helps.
At 04 NOV 1998 04:56AM cpates@sprezzatura.com,[url=http://www.sprezzatura.com]Sprezzatura Ltd[/url] wrote:
Greg,
I may be that the event chain is stopping at your POSCHANGED event. If so the validation will probably never get called.
What is your event code returning? 1 or 0? Make sure it's returning 1.
Also you could try calling Forward_Event()and returning 0 instead in your code to run the validation first before you set the new cell. That way if Get_EventStatus() returns TRUE$ you know that you don't have to do anything as the validation has failed.
cpates@sprezzatura.com
World Leaders in all things RevSoft
At 04 NOV 1998 12:14PM Greg James wrote:
Thanks Andre and Carl. I used the Forward_Event subroutine in my script and that seemed to do the trick.
gjames@cyberhighway.net onmouseover=window.status=email greg james;return(true)"