tags:

views:

148

answers:

2

I've been experimenting a quite strange problem using Delphi 2010. In one form (a quite complex one) some buttons are automagically losing the click event. I am not dynamically assigning the event or something (they are wired in IDE). The events are fired OK some times but suddenly (and randomly) some of them don't fire the events anymore. Placing a break point in the event doesn't stop the execution.

Weird, yes, and I'm lost. I know there is no explanation for this so I only want to ask if there is anybody else experimenting the same problem.

A: 

May be that events have't code and losing during compilation?

cemick
YEs, they execute very well. Often 99% of the time. Weird , I know.
Lobuno
+1  A: 

Check for multiple .dcu files in different directories. It may be picking up an older one. I've found that if you're stepping through the debugger and the code seems mis-aligned to the execution (especially if it's stepping through lines that aren't actually instructions, like begin/end or comments), then you've got an old .DCU or .BPL.

Chris Thornton
Thanks, that was good help. Actually I think my problem was that a dcu with the same name was placed in some other directory that was included in the path. After renaming it, it seems to work fine now. Need to test some more.
Lobuno