[Mono-winforms-list] OpenFileDialog throwing ArgumentNullException

Bill Medland billmedland@mercuryspeed.com
Mon, 28 Mar 2005 17:11:56 -0800


On March 28, 2005 04:55 pm, Trimble, Nathan G wrote:
> I realize some people on this list may know the status of various
> controls at any given moment, but I imagine there are also some lurkers
> on the list who may just be trying to learn a little bit about mono.
> I'm pretty decent with C# but not real knowledgeable with mono.  If you
> could post a little code along with your questions I might be able to
> try running it too.  Just a thought.

Well, Since " Test program simply declares an OpenFileDialog" is clearly not 
explicit enough:
class ofd01 {
    public static void Main () {
        System.Windows.Forms.OpenFileDialog ofd = new 
System.Windows.Forms.OpenFileDialog();
        System.Console.WriteLine ("Hello, World");
    }
}

>
> Sincerely,
>
>
> Nate Trimble
>
> -----Original Message-----
> From: mono-winforms-list-admin@lists.ximian.com
> [mailto:mono-winforms-list-admin@lists.ximian.com] On Behalf Of Bill
> Medland
> Sent: Monday, March 28, 2005 4:37 PM
> To: mono-winforms-list@lists.ximian.com
> Subject: [Mono-winforms-list] OpenFileDialog throwing
> ArgumentNullException
>
> Can anyone tell me, is this me doing something wrong or is it a current
> bug in the code?
>
> (Assuming I am doing the build properly) mono is the current version
> updated 10 minutes ago.
>
> Test program simply declares an OpenFileDialog
>
> Program throws:
>
> Unhandled Exception: System.ArgumentNullException: Cannot add null image
> Parameter name: value in <0x00104>
> System.Windows.Forms.ImageList+ImageCollection:Add
> (System.Drawing.Image value)
> in <0x001a6> System.Windows.Forms.MWFFileView:.ctor () in (wrapper
> remoting-invoke-with-check) System.Windows.Forms.MWFFileView:.ctor
> ()
> in <0x00236> System.Windows.Forms.FileDialog+FileDialogPanel:.ctor
> (System.Windows.Forms.FileDialog fileDialog) in (wrapper
> remoting-invoke-with-check) FileDialogPanel:.ctor
> (System.Windows.Forms.FileDialog)
> in <0x000ad> System.Windows.Forms.OpenFileDialog:.ctor () in (wrapper
> remoting-invoke-with-check) System.Windows.Forms.OpenFileDialog:.ctor ()
> in <0x00024> ofd01:Main ()
>
> --
> Bill Medland
> mailto:billmedland@mercuryspeed.com
> http://webhome.idirect.com/~kbmed
>
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list

-- 
Bill Medland
Programmer
ACCPAC International, Inc.
bill.medland@BestSoftware.com
Corporate: www.accpac.com
Hosted Services: www.accpaconline.com