[Mono-winforms-list] Question about CommonDialog implementation

Aleksandar Dezelin dezelin32@fastmail.fm
Thu, 30 Dec 2004 11:40:13 +0100


This is a multi-part message in MIME format.
--------------000708050105050103070007
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Peter Dennis Bartok wrote:
>>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.
> 
> I am not sure I understand what you are talking about, it might help to see 
> your code to understand. How would ShowDialog() work if CommonDialog does 
> not create the form?
>

FontDialog c'tor creates new FontDialogForm (derived from DialogForm) 
and CommonDialog also creates DialogForm, so now we have a DialogForm 
instance which is actually never used!

I have attached a cuurent version of FontDialog.cs.

> 
>>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.
> 
> Are you sure you're on the latest svn code? I thought I had a check for that 
> in all places. Would you have a testcase?
> 

I've make an update from the latest svn and now everything works fine.

Cheers,
Aleksandar Dezelin

-- 
Linux is like wigwham - no windows, no gates, and apache inside...

--------------000708050105050103070007
Content-Type: application/zip;
 name="FontDialog.zip"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="FontDialog.zip"

UEsDBBQAAAAIAOBcnjEA6F+aXhQAAAxaAAANAAAARm9udERpYWxvZy5jc808a2/bSJKfFWD+
Q48X8MiITnGywd1cvNk72ZZjYWzLkOxkc4PBgSZbFi8UqSUpO56s77dfVfW72ZQlZxa4YEYm
u+vd1VXd1S29esUueblIqyotcpZWbM5LfvPAbssor3nSY7OSc1bMWDyPylveY3XBovyBLXlZ
AUJxU0dpnua3P7x49YpFLC6WDwhdz4FUVczq+6jkgJCwqKqKOI2AJkuKeLXgeR3VyHOWZrxi
3XrOicbOVGLt7BGzhEcZS3OgyJnqYvdpPS9WNSt5VZdpjHR6ABRnq0TJokCydJFKTkiiTG/n
dYW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