Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 30 JUN 1999 08:23:59AM Simon Bowyer wrote:

I have a wizard style multi page window with many gotfocus and lostfocus events. Every event is a quickevent and calls a procedure with the event type passed as a parameter. One particular lostfocus event validates a date field and displays a warning message if it is older than a certain number of days from today. This event works fine but when the warning message is displayed the following fields gotfocus event does not happen. The cursor moves onto the field but the quickevent is not executed. I tried putting a script onto the gotfocus event of this field but this is not called either. Why would displaying a message prevent the following gotfocus event from occuring? We are using OI 3.4. This error can be easily repeated. Simply add two edit fields to a new window. Write a lostfocus event for the first edit field to display a message. Write a gotfocus event for the second edit field to display a different message. Run the window and tab from the first field to the second. The lostfocus message will a

ppear but the gotfocus message will not. If the message displayed in the lostfocus event is then removed but an event still exists, the gotfocus event happens correctly.


At 30 JUN 1999 12:01PM Tony Marler @ Prosolve wrote:

Simon

You have found a feature of OI! Certain system calls such as SYSMSG interupt the event chain. Thus MSG simply resets the focus of the next control and by setting the focus (same as coding SET_PROPERTY(Ctrl , "FOCUS") the gotfocus event is not fired.

One way around this would be to fire it yourself for example in lostfocus code:

RetVal= MSG(@WINDOW , "MY LOSTFOCUS MESSAGE")

if FocusID=@WINDOW:".NEXTFIELD" then

  RetVal=Send_Event(FocusID, "GOTFOCUS")

end

FocusID is passed by the system as fourth parameter to lostfocus event. Without it the gotfocus event would be fired wherever focus was lost to!

Tony


At 02 JUL 1999 11:49AM Simon Bowyer wrote:

We are doing something very similar to this but when the message doesn't appear (ie data passes validation)the event happens twice!

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/d9ddf1b147d9b5a7852567a000441d3d.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1