🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.winforms.controls.using
1 messages
1 total messages Started by Frederick C. Wilt Sat, 16 Sep 2006 04:51
Disappearing event handler assignments in BDS2006 C# app using 3rd party control
#11
Author: Frederick C. Wilt
Date: Sat, 16 Sep 2006 04:51
35 lines
2648 bytes
Hi,

I'm trying to write a C# app (in BDS2006, updated and patched) that uses a 
3rd party .NET control. The control is not a visible one, it only exists to 
provide drag-and-drop access to the properties and events of the 
encapsulated class.

The problem is that some of the events "forget" they were assigned event 
handlers.

When you double click on an empty event the designer switches to the code 
window showing the skeleton on the required event handler (as expected). I 
put a comment in each one just for testing. When I switch back to the design 
window I often get an error message: Failed to find event 'whatever'

I have also noticed that for these same problem events when you go back to 
the object inspector and access the drop down arrow for the event it shows 
nothing. Even though the code for the event handler is still there, the 
designer doesn't present it as a candidate for assigning to the event.

The events that are not a problem show the assigned event as a candidate. If 
I remove the line of code which associates the event handler code with the 
event and then go back to the object inspector and click the drop down arrow 
the event handler is presented as a candidate (as expected).

I am guessing the something is wrong with the implementation of the control 
but what would allow the designer to create the correct event handler code 
the first time the event is assigned a handler and from then on refuse to 
recognize that the still existing event handler is valid for the event?

The events that cause the problems are always the same ones.

Windows form controls like the button or checkbox work just fine.

Thanks, Frederick C. Wilt
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads