Karen, here is a better sample that I clipped from one of my DBGrids.

 

--This code must be placed in Form Timer EEP to prevent double click on
DBGrid

clear VAR vBlockDoubleClick

PROPERTY RBASE_FORM TIMERENABLED 'FALSE'

return

--------------------------------------------------

--This code goes in on-click EEP

SET VAR vBlockDoubleClick INTEGER

IF vBlockDoubleClick IS NOT NULL THEN

  RETURN

ENDIF

-- Your code starts here

 

YOUR CODE BLOCK HERE

 

--Your code ends here

 

recalc var

PROPERTY RBASE_FORM TIMERINTERVAL 1000

PROPERTY RBASE_FORM TIMERENABLED 'TRUE'

RETURN

 

John

 

From: [email protected] [mailto:[email protected]] On Behalf Of
[email protected]
Sent: Monday, July 12, 2010 9:52 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: access violation

 

John:  Back up the wagon... I'm interested in hearing how you used a form
timer to do this.

At one client I have a nice DBGrid with an on click EEP that brings up the
individual edit form.  The eep closes the form completely, then brings up
the individual edit form.   My problem:  everything is run from a main menu
that stays in the background.  If they double-click on the DBGrid row rather
than single-click, it actually launches the first item on the background
main menu as if they clicked on it!  This happens in the second it takes for
the individual edit form to come up!  So they end up with actually 2 forms
on their screen (and they aren't MDI forms) so that confuses RBase and it
locks up.  I was thinking I would either have to replace the DBGrids with
list views so they can double-click, or perhaps close that main menu and
have all forms come off my main app instead.

So how does a form timer help that?

Karen





About a year ago I struggled with a similar problem.  In my case, I isolated
the problem to forms with DBGrids where I make use of the on click EEP.  I
discovered that some users would click multiple times (instead of once)
causing various errors or erroneous results (including occasional access
violations).  To resolve the problem, I made use of the form timer to
restrict the clicks to one.

  

If your problem is similar to the problem I had, let me know and I will send
you a copy of the code that I use.  I am not in my office at the moment but
I should be back around 2:00 PM and I will send it to you if you want to
give it a try.

  

John

 

Reply via email to