|
| Grid onleftmousedown |
 |
Mon, 07 Apr 2008 14:40:03 -040 |
Hello all
I am having an unusual dbase crash from grids I have on a modal form when an
onleftmousedown event fires
I have a simple modal form called when user right clicks on a form object.
Two grids are on the modal form, and a close button, thats it.
When I put an obvious error anywhere in the onleftmousedown method, dbase
catches the error but after I close the underlying forms dbase dissapears from
the screen, and I have to reboot from scratch?
I can put this error (? a variable that doesnt exist) anywhere else in the wfm
code and dbase catches the error properly and returns to the IDE.
I have put the error in onopen event, close event, btn_close event and all works
ok with dbase catching the error and returning to the IDE.
but as soon as I put the error in the onleftmousedown Method and click on a
cell, error is trapped but dbase crashes even if it is on the 1st line of the
method ?
Ofcourse you have to trigger the onleftmousedown to cause the crash.
Without triggering the error the form and grids work smoothly and as expected
but only crashes if there is an error in lmd.
Does anyone have any Ideas, It doesnt seem like its anything I need to correct,
I've tried everything I can think of including stripping the grids properties
down to bare min.
Sincerely
Don
|
| Post Reply
|
| Re: Grid onleftmousedown |
 |
Mon, 7 Apr 2008 15:37:40 -0400 |
Strangely enough, I've noticed something similar to your problem with the
new dBase 2.6.1.4.
I think it also has something to do with the Grid in my case, but I'm not
sure what it is. I was doing a routine in the onClose event of my forms
that released all the objects of the form in a loop. The releasing routine
was enclosed in a Try ... Catch ... Endtry block; just in case the objects
had no .release() method, I was using the Release Object command afterward
to ensure that the memory was properly released.
I noticed this problem because I was in a Combobox cell of a grid in one of
my forms and I closed the form by clicking X. Suddenly, the whole
application shut down for apparently no reason and I had to restart the
program again. After some research, I found out that it was my releasing
routine that was causing the problem, but I didn't know why exactly... Now
that I think of it, I would guess that the Release Object command triggered
an error, which was caught by the Try ... Catch, which in turn probably
caused this unknown problem since focus was still effectively on the
Combobox cell of the grid. That's why I think it is linked to the grid
somehow.
Anyway, I just removed my routine from the onClose event for the time being
(I was not even sure it was useful as far as memory management is
concerned), but I wouldn't mind having an explanation for this strange
problem. Perhaps it should be posted in the Bug-Reports newsgroup ?
Marc Hamelin
Don wrote:
> Hello all
>
> I am having an unusual dbase crash from grids I have on a modal form
> when an onleftmousedown event fires
>
> I have a simple modal form called when user right clicks on a form
> object.
>
> Two grids are on the modal form, and a close button, thats it.
>
> When I put an obvious error anywhere in the onleftmousedown method,
> dbase catches the error but after I close the underlying forms dbase
> dissapears from the screen, and I have to reboot from scratch?
>
> I can put this error (? a variable that doesnt exist) anywhere else
> in the wfm code and dbase catches the error properly and returns to
> the IDE.
>
> I have put the error in onopen event, close event, btn_close event
> and all works ok with dbase catching the error and returning to the
> IDE.
>
> but as soon as I put the error in the onleftmousedown Method and
> click on a cell, error is trapped but dbase crashes even if it is on
> the 1st line of the method ?
>
> Ofcourse you have to trigger the onleftmousedown to cause the crash.
>
> Without triggering the error the form and grids work smoothly and as
> expected but only crashes if there is an error in lmd.
>
> Does anyone have any Ideas, It doesnt seem like its anything I need
> to correct, I've tried everything I can think of including stripping
> the grids properties down to bare min.
>
> Sincerely
> Don
|
| Post Reply
|
| Re: Grid onleftmousedown |
 |
Tue, 8 Apr 2008 02:16:15 -0400 |
In article <7Xx$K7NmIHA.960@news-server>, drplum@verizon.net says...
> Hello all
>
> I am having an unusual dbase crash from grids I have on a modal form when
an onleftmousedown event fires
>
> I have a simple modal form called when user right clicks on a form object.
>
> Two grids are on the modal form, and a close button, thats it.
>
> When I put an obvious error anywhere in the onleftmousedown method, dbase
catches the error but after I close the underlying forms dbase dissapears from
the screen, and I have to reboot from scratch?
>
> I can put this error (? a variable that doesnt exist) anywhere else in the
wfm code and dbase catches the error properly and returns to the IDE.
>
> I have put the error in onopen event, close event, btn_close event and all
works ok with dbase catching the error and returning to the IDE.
>
> but as soon as I put the error in the onleftmousedown Method and click on a
cell, error is trapped but dbase crashes even if it is on the 1st line of the
method ?
>
> Ofcourse you have to trigger the onleftmousedown to cause the crash.
>
> Without triggering the error the form and grids work smoothly and as
expected but only crashes if there is an error in lmd.
>
> Does anyone have any Ideas, It doesnt seem like its anything I need to
correct, I've tried everything I can think of including stripping the grids
properties down to bare min.
>
> Sincerely
> Don
Don,
Which version of dBASE is this? On which version of Windows? If this is
the latest version, can you make a small turnkey example and provide it
to dBASE in the dbase.bug-reports news group?
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada
.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
|
| Post Reply
|
| Re: Grid onleftmousedown |
 |
Tue, 08 Apr 2008 08:29:29 -040 |
Geoff Wass [dBVIPS] Wrote:
> In article <7Xx$K7NmIHA.960@news-server>, drplum@verizon.net says...
> > Hello all
> >
> > I am having an unusual dbase crash from grids I have on a modal form
when an onleftmousedown event fires
> >
> > I have a simple modal form called when user right clicks on a form
object.
> >
> > Two grids are on the modal form, and a close button, thats it.
> >
> > When I put an obvious error anywhere in the onleftmousedown method,
dbase catches the error but after I close the underlying forms dbase dissapears
from the screen, and I have to reboot from scratch?
> >
> > Sincerely
> > Don
>
>
> Don,
>
> Which version of dBASE is this? On which version of Windows? If this is
> the latest version, can you make a small turnkey example and provide it
> to dBASE in the dbase.bug-reports news group?
>
> --
> Geoff Wass [dBVIPS]
> Montréal, Québec, Canada
>
> .|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
> .|.|.| ---------------------------------------------------------- |.|.|.
> .|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
Geoff
This was the new version 2.61.4 and I program on my xp machine.
I do my programming on wk ends but am going out of town this wk end. If I can
squeeqe it in I will.
|
| Post Reply
|
| Re: Grid onleftmousedown |
 |
Wed, 9 Apr 2008 01:56:12 -0400 |
In article <ODz$wQXmIHA.1688@news-server>, drplum@verizon.net says...
> Geoff
>
> This was the new version 2.61.4 and I program on my xp machine.
>
> I do my programming on wk ends but am going out of town this wk end. If I
can squeeqe it in I will.
>
> Don
Don,
I saw your posting. Thank-you for doing that!
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada
.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
|
| Post Reply
|
|
|