PC Review


Reply
Thread Tools Rate Thread

code generation woes (need code at END of Initialize Component)

 
 
Bill Foust
Guest
Posts: n/a
 
      11th Aug 2003
I'm making a custom COMPONENT that is derived from
DataSet. I've implemented a custom serializer to generate
the code I need which is working - when the controls are
placed onto the form, and thus the code is generated, in a
specific order. When the controls are added in a different
order, the code breaks. This is because the component
references the Text property of some related controls on
the form. If the control is placed before the component,
it works. If its not, the Text is a Null value and this
causes problems during deserialization.

So I need to be able to do some processing at the VERY END
OF the InitializeComponents() function. I found and
implemented the ISupportInitialize interface which gives
me a BeginInit and EndInit function. Adding my custom
processing here works, but ONLY DURING AN ACTUAL RUN. If
the form is loaded up and deserialized by the designer, it
does NOT EXECUTE EndInit() and therefore the processing
isn't done and therefore the component DOES NOT WORK IN
DESIGN MODE.

How come the designed doesn't execute EndInit()? What can
I do to cause code to be placed at the end of the
InitializeComponents() function?

Bill

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reference.map(1): Custom tool warning: DiscoCodeGenerator unable to initialize code generator. No code generated. genc ymeri Microsoft ASP .NET 0 27th Apr 2006 04:28 PM
Reference.map(1): Custom tool warning: DiscoCodeGenerator unable to initialize code generator. No code generated. genc ymeri Microsoft C# .NET 0 27th Apr 2006 04:28 PM
C# 2005 how to remove warning "The file 'C:\Main.cs' does not support code parsing or generation because it is not contained within a project that supports code. Serdge Kooleman Microsoft C# .NET 0 9th Feb 2006 05:43 PM
Failed to initialize component. Exit code 4288477 =?Utf-8?B?TkdVWUVOIEgu?= Microsoft Outlook Installation 1 7th Feb 2006 04:41 PM
Web Form Designer object and initialize component code disappear by themselves Jonathan Stone Microsoft ASP .NET 0 11th Nov 2005 08:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:02 PM.