I am not a Borland user, so I don't have the experience you have had.
However, I don't see why you shouldn't be able to do this.
Create a base class derived from System.ComponentModel that provides your
run-time funcationality for your object. Put your type converters into this
class.
Create another class, derived from that one, that provides the design time
functionality. Put these classes into two seperate projects.
The upper class would make reference to any code from the design time
portions of other components... simply make sure that the runtime classes do
not have access to the design time capabilities of other controls and you
won't get the links you don't want.
Since the design time control simply inherits the capabilities of the
run-time class, you can have functionality that applies to both fairly
readily.
I'm not sure why you believe that this isn't possible, but to be honest, I'm
not doing control development. You may very well have stumbled upon a
limitation and I may very well be speaking out of ignorance. If that is the
case, I apologize.
In conclusion, while Borland's objects may have had this kind of thing
built-in, I'm not certain that your problems aren't simply design issues,
and not actually framework limitations.
Either way, good luck,
HTH,
--- Nick
> It does not appear this is possible in .NET. I can still certainly divide my
> component into two different assemblies, one for run-time code and one for
[quoted text clipped - 28 lines]
> unnecessarily shipped to end-users for run-time execution. Does anybody know
> how to do this ?
> I am not a Borland user, so I don't have the experience you have had.
> However, I don't see why you shouldn't be able to do this.
>
> Create a base class derived from System.ComponentModel that provides
> your run-time funcationality for your object. Put your type
> converters into this class.
I only need my type converters at design-time. Putting type converters in
my class pays for something I do not need at run-time. The whole idea of
putting type converters into a design-time assembly, and then having
attributes which reference these type converters purely for design-time
functionality, is a decent one, but it ties my run-time assembly to my
design-time assembly even when I do not need the functionality at run-time.
> Create another class, derived from that one, that provides the design
> time functionality. Put these classes into two seperate projects.
> The upper class would make reference to any code from the design time
> portions of other components... simply make sure that the runtime
> classes do not have access to the design time capabilities of other
> controls and you won't get the links you don't want.
But I would still be using the design-time capabilities of my own control in
my run-time assembly even though I only need this at design-time and not
run-time. The same goes for design-time editors and designers. In order to
use them, one must specify attributes in the run-time component, and this
ties the run-time component to the design-time component, even when the
design-time component is no longer needed at run-time.
> Since the design time control simply inherits the capabilities of the
> run-time class, you can have functionality that applies to both fairly
[quoted text clipped - 4 lines]
> stumbled upon a limitation and I may very well be speaking out of
> ignorance. If that is the case, I apologize.
I could be wrong but I do not believe that attributes are polymorphic. When
you specify an attribute, you specify the exactly class of the attribute.
> In conclusion, while Borland's objects may have had this kind of thing
> built-in, I'm not certain that your problems aren't simply design
> issues, and not actually framework limitations.
I do not think you have solved the problem. I do not see this as my design
issue. The only other way to solve it, as I understand it, is to create the
design-time attributes for my types and properties at run-time rather than
directly in the source. But this is a PITA.
I am still surprised that no one else has run into this situation.
> Either way, good luck,
> HTH,
[quoted text clipped - 33 lines]
>> have to be unnecessarily shipped to end-users for run-time
>> execution. Does anybody know how to do this ?