[Mono-winforms-list] Question about CommonDialog implementation
Aleksandar Dezelin
dezelin32@fastmail.fm
Wed, 29 Dec 2004 18:35:04 +0100
I don't understand, why are we making the instance of the DialogForm in
the CommonDialog constructor? CommonDialog is an abstract class so one
should make an instance of his own class inherited from DialogForm class
like FontDialogForm in FontDialog constructor. This way we have one
useless DialogForm instance.
Another thing. When I create an instance of FontDialog class, current
Dialog implementation calls
CommonDialog.DialogForm.FormParentWindow.CreateParams with undefined
'owner' field and trows an exception. I've tracked it down, and found that
this internal c'to gets called:
internal FormParentWindow(Form owner) : base() {
...
}
which calls Control() c'tor that checks CreateParams property which is
virtual and dependent on the 'owner' field' that's never been assigned
so far.
Cheers,
Aleksandar Dezelin
--
Linux is like wigwham - no windows, no gates, and apache inside...