Article View: borland.public.delphi.winforms.controls.using
Article #11Disappearing event handler assignments in BDS2006 C# app using 3rd party control
From: Frederick C. Wilt
Date: Sat, 16 Sep 2006 04:51
Date: Sat, 16 Sep 2006 04:51
35 lines
2648 bytes
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
Technical Details
Message-ID:
<450b82f6$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 1eff29,9b0e60ed906206d4,start X-Google-Attributes: gid1eff29,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Frederick C. Wilt" <fcwilt@mindspring.com> Newsgroups: borland.public.delphi.winforms.controls.using Subject: Disappearing event handler assignments in BDS2006 C# app using 3rd party control Date: Sat, 16 Sep 2006 00:51:54 -0400 Lines: 37 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 70.177.164.151 Message-ID: <450b82f6$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1158382326 70.177.164.151 (15 Sep 2006 21:52:06 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail