CPB Mailing List
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The damnedest problem?!?!?
Usually an exception has additional information which can help you. Is this a
vcl generated exception, or the more general "access violation"?
if it's a vcl exception, you should be a lot closer to tracking down the cause
once you make sense of the exception.
if it's an access violation, then it's a little more difficult.
first, try removing the "Repaint()" call - is the exception still there?
my first guess would be that the error is related to the assignment prior to the
repaint, rather than the repaint itself; an access violation means that you are
trying to read or write to memory which hasn't been specifically allocated to
your application. In your case I would guess that the assignment statement is
corrupting the pointer (edtLineCurrent is a pointer to TEdit, presumably), and
when you try to dereference it on the next line, you get an access violation
since the pointer is now pointing at an undefined location.
Why the pointer gets corrupted is another question. What exactly is happening
during the statement ...->Text = i+1; ?
Shawn Anderson wrote:
...
>
> edtLineCurrent->Text = i+1;
> edtLineCurrent->Repaint(); <-- Exception Error
...
W Komornicki's Home Page |
Main Index |
Thread Index