Normal Topic On Element Entry event executes twice (Read 743 times)
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
On Element Entry event executes twice
Sep 19th, 2004 at 1:32am
Print Post Print Post  
Mark and/or Erika,

I have found that On Element Entry programming is executing TWICE if you click on the LE with the mouse. (It correctly executes once if you navigate with the keyboard.) This ONLY occurs if there is a ThrowFocus or Goto command in the programming event; otherwise, things function correctly.

You can test this yourself using the Customers.db after placing this code into the "State :: On Element Entry" programming event:
Position = @tn(Position) + 1
ThrowFocus(First)


Then open Main Form in Add Date mode, and try clicking on the State element. You will see that Position will increment by 2 with each click of the mouse, and it will increment by 1 each time you navigate to State with the keyboard.

I think I reported this to support last spring. I am wondering if you are aware of this, and if it has been fixed in 1.0.5?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: On Element Entry event executes twice
Reply #1 - Sep 19th, 2004 at 4:33pm
Print Post Print Post  
Yes, it's fixed in 1.0.5.

Please use with great caution and only under extreme need. It is very easy to create infinite loops using SBasic this way. It will also cause confusion on the part of the user if the mouse doesn't go where they explicitely told it to go.

When you reported it earlier - did you actually report it, or did you just post here? Posting here will only get bugs fixed at the whim and convenience of the developers. An official bug report is the only way to make sure that it comes to our attention and that time is made to look into it.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: On Element Entry event executes twice
Reply #2 - Sep 19th, 2004 at 5:08pm
Print Post Print Post  
Quote:
Yes, it's fixed in 1.0.5.

Thank you! As usual, you have demonstrated that Lantica has the FASTEST bug fix record of any software company I have dealt with!

Quote:
Please use with great caution and only under extreme need. It is very easy to create infinite loops using SBasic this way. It will also cause confusion on the part of the user if the mouse doesn't go where they explicitely told it to go.

Of course, that code was just for demonstration of the bug. I want to use ThrowFocus after a @UserSelect choice has been made, to move focus to another field in a table subform. If I don't force focus out of the subform LE that contains @UserSelect in On Element Entry, it executes (even though the cursor was not in the subform) every time the main form advances to the next record.

Quote:
When you reported it earlier - did you actually report it, or did you just post here?

I think I mentioned it to Ray via email while we were tackling another issue. So, I guess it was secondary to the issue at hand at that time.

I didn't mean put you on the spot for not fixing it earlier; I just wanted to give you a "heads up" that it might be something that you already looked into. (Didn't want to waste your time if it was an old issue.)
« Last Edit: Sep 20th, 2004 at 11:37am by Carl Underwood »  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged