[Mono-dev] SystemIcons.Exclamation produces an exception.

Sebastien Pouliot sebastien.pouliot at gmail.com
Sat Dec 2 12:24:04 EST 2006


Hello Caz,

The class is not implemented. The current stub just returns null for any
icons.

This makes me wonder where does SWF get it's own icons ;-) There's
probably some code/art sharing do be done there.

On Sat, 2006-12-02 at 08:56 -0800, caz yokoyama wrote:
> Has anyone ever used SystemIcons.Exclamation? It produces an exception
> while it works on Windows. Is this a bug or am I missing something?
> 
>  
> 
> ------------ icon.cs ----------
> 
> using System;
> 
> using System.Drawing;
> 
> using System.Collections;
> 
> using System.Drawing.Imaging;
> 
> using System.Security.Cryptography;
> 
>  
> 
> class icon
> 
> {
> 
>             public static void Main () {
> 
>                         Icon aaa = new Icon(SystemIcons.Exclamation,
> 40, 40);
> 
>                         Console.WriteLine("Hello World");
> 
>             }
> 
> }
> 
>  
> 
> -------------- log ---------
> 
> [caz at localhost icon]$ mcs -debug  -r:System.Drawing.dll icon.cs
> 
> icon.cs(10,8): warning CS0219: The variable `aaa' is assigned but its
> value is never used
> 
> Compilation succeeded - 1 warning(s)
> 
> [caz at localhost icon]$ mono --debug icon.exe
> 
>  
> 
> Unhandled Exception: System.NullReferenceException: Object reference
> not set to an instance of an object
> 
>   at System.Drawing.Icon..ctor (System.Drawing.Icon original, Size
> size) [0x0001f]
> in /tmp/scratch/BUILD/mono-1.2.1/mcs/class/System.Drawing/System.Drawing/Icon.cs:129
> 
>   at System.Drawing.Icon..ctor (System.Drawing.Icon original, Int32
> width, Int32 height) [0x00000]
> in /tmp/scratch/BUILD/mono-1.2.1/mcs/class/System.Drawing/System.Drawing/Icon.cs:122
> 
>   at (wrapper remoting-invoke-with-check) System.Drawing.Icon:.ctor
> (System.Drawing.Icon,int,int)
> 
>   at icon.Main () [0x00000] in /home/caz/umd/icon/icon.cs:10
> 
>  
> 
> - caz at caztech dot com.
> 
>  
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
-- 
Sebastien Pouliot  <sebastien at ximian.com>
Blog: http://pages.infinit.net/ctech/




More information about the Mono-devel-list mailing list