Hi Pete. Yes, my constructors are parameterless. The classes are very
simple
and I already made the test. Commented all inner class code and tried
with generics
and without it. Only work without generics.
In my mind, the designer tries to instantiate the base class and fails
because it
doesn't know what to put in the generic parameter.
I hope you're right. Someone who understands the designer....
Cassio Tavares
On Jun 26, 6:25 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
> Hi Pete. Yes, my constructors are parameterless. The classes are very
> simple
> and I already made the test. Commented all inner class code and tried
> with generics
> and without it. Only work without generics.
When you say you tested it "without generics", did you replace the generic
base class with a different concrete class derived from Form? Or did you
just replace it with Form itself?
I ask because it's not clear from your description exactly how you did the
test, and it could be that the problem you're having isn't actually
related to generics per se.
> In my mind, the designer tries to instantiate the base class and fails
> because it
> doesn't know what to put in the generic parameter.
But that's what I don't understand. The base class isn't the generic
class. It's a fully-qualified class, just as concrete as any other
class. The designer doesn't need to know what to put in the generic
parameter; you've already put that there already in your class definition.
> I hope you're right. Someone who understands the designer....
I hope so. :)
I apologize for not trying it myself. It's not like it would be all that
hard to test here, but I've been spending some time trying to wrap my head
around Apple's Cocoa programming environment, and I'm trying my best to
not start up Windows today. Too distracting, 'cause I wind up wasting a
lot of time messing around with stuff that's interesting but not
productive in the short-term. :)
Pete
CassioT - 27 Jun 2007 13:00 GMT
Sorry Pete if I was not clear enough. The base class is the generic
class.
public BaseForm<T> : Form
{}
public MyForm : BaseForm<MyType>
{}
MyForm is the form that doesn't open in the designer. But using...
public BaseForm : Form
{}
public MyForm : BaseForm
{}
it opens.
But you made me think. :)
The base form, has the generic parameter, and opens in the
designer!!!
Maybe there is one more thing that I didn't told you. They are in
different
assemblies.
I will do more tests. I will copy all the code to the same assembly to
see what
happens.
You don't need to apologize Pete. You're already doing too much
talking with me
here. And I never heard about Apple's Cocoa before. :)
Thank you.
> > Hi Pete. Yes, my constructors are parameterless. The classes are very
> > simple
[quoted text clipped - 31 lines]
>
> Pete