Re: [Mono-winforms-list] Oddball SWF problem.

2008-09-09 Thread Ivan N. Zlatev
On Tue, Sep 9, 2008 at 1:22 PM, Paul <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm using a bog standard OpenFileDialog with Mono 2.0 RC 1 (code below).
> When I run the app, everything is fine until I go to the directory which
> contains .spec files (these are plain text files used for packaging
> under Linux).. it then goes kabloom with the following throwback (from
> MD 1.9)

It seems that on your setup there is no icon associated with the mime
type for the ".spec" and there is no fallback by the gnome/gtk
functions (weird) and we don't handle that nicely. I can't reproduce
here (.spec mime type is text/x-rpm-spec and icon is the text file
one). I suggest you file a bug so we can fix this. It's probably just
a missing null check somewhere.

>
> Unhandled Exception: System.ArgumentNullException: Argument cannot be
> null.
> Parameter name: value
>  at System.Windows.Forms.ImageList+ImageCollection+ImageListItem..ctor
> (System.Drawing.Image value) [0x0003b]
> in 
> /home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageList.cs:202
>  at System.Windows.Forms.ImageList+ImageCollection+ImageListItem..ctor
> (System.Drawing.Image value, Color transparentColor) [0x0]
> in /home/paul/rpmbuild/BUILD/mono-2.0/mcs/build/common/Consts.cs:1
>  at System.Windows.Forms.ImageList+ImageCollection.Add
> (System.Drawing.Image value, Color transparentColor) [0x0]
> in 
> /home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageList.cs:716
>  at System.Windows.Forms.GnomeHandler.AddAndGetIconIndex (System.String
> filename, System.String mime_type) [0xc]
> in 
> /home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs:374
>  at System.Windows.Forms.MimeIconEngine.GetIconIndexForFile
> (System.String full_filename) [0x0006b]
> in 
> /home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs:159
>  at System.Windows.Forms.FileSystem.GetFileFSEntry (System.IO.FileInfo
> fileinfo) [0x00043]
> in 
> /home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3597
>  at System.Windows.Forms.FileSystem.GetNormalFolderContent
> (System.String from_folder,
> System.Collections.Specialized.StringCollection filters,
> System.Collections.ArrayList& directories_out,
> System.Collections.ArrayList& files_out) [0x000ea]
> in 
> /home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3543
>  at System.Windows.Forms.FileSystem.GetFolderContent
> (System.Collections.Specialized.StringCollection filters,
> System.Collections.ArrayList& directories_out,
> System.Collections.ArrayList& files_out) [0x0016f]
> in 
> /home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3465
>  at System.Windows.Forms.MWFVFS+WorkerThread.GetFolderContentThread ()
> [0x0]
> in 
> /home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3240
>
>
> The application was terminated by a signal: SIGHUP
>
> Code which did the nasty
>
> 8-->
>private string createDialog()
>{
>OpenFileDialog filer = new OpenFileDialog();
>filer.Filter = "spec files (*.spec)|*.spec";
>filer.Title = "Select a spec file";
>return ( filer.ShowDialog() == DialogResult.OK )
>? filer.FileName : null;
>}
>
>private void button1Click(object sender, EventArgs e)
>{
>createDialog();
>}
> <--8
>
> Nothing nasty, it just doesn't behave!
>
> Any ideas?
>
> TTFN
>
> Paul
> --
> Sie können mich aufreizen und wirklich heiß machen!
>
> ___
> Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>
>



-- 
Kind Regards,
Ivan N. Zlatev
___
Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list


[Mono-winforms-list] Oddball SWF problem.

2008-09-09 Thread Paul
Hi,

I'm using a bog standard OpenFileDialog with Mono 2.0 RC 1 (code below).
When I run the app, everything is fine until I go to the directory which
contains .spec files (these are plain text files used for packaging
under Linux).. it then goes kabloom with the following throwback (from
MD 1.9)

Unhandled Exception: System.ArgumentNullException: Argument cannot be
null.
Parameter name: value
  at System.Windows.Forms.ImageList+ImageCollection+ImageListItem..ctor
(System.Drawing.Image value) [0x0003b]
in 
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageList.cs:202
 
  at System.Windows.Forms.ImageList+ImageCollection+ImageListItem..ctor
(System.Drawing.Image value, Color transparentColor) [0x0]
in /home/paul/rpmbuild/BUILD/mono-2.0/mcs/build/common/Consts.cs:1 
  at System.Windows.Forms.ImageList+ImageCollection.Add
(System.Drawing.Image value, Color transparentColor) [0x0]
in 
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageList.cs:716
 
  at System.Windows.Forms.GnomeHandler.AddAndGetIconIndex (System.String
filename, System.String mime_type) [0xc]
in 
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs:374
 
  at System.Windows.Forms.MimeIconEngine.GetIconIndexForFile
(System.String full_filename) [0x0006b]
in 
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs:159
 
  at System.Windows.Forms.FileSystem.GetFileFSEntry (System.IO.FileInfo
fileinfo) [0x00043]
in 
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3597
 
  at System.Windows.Forms.FileSystem.GetNormalFolderContent
(System.String from_folder,
System.Collections.Specialized.StringCollection filters,
System.Collections.ArrayList& directories_out,
System.Collections.ArrayList& files_out) [0x000ea]
in 
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3543
 
  at System.Windows.Forms.FileSystem.GetFolderContent
(System.Collections.Specialized.StringCollection filters,
System.Collections.ArrayList& directories_out,
System.Collections.ArrayList& files_out) [0x0016f]
in 
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3465
 
  at System.Windows.Forms.MWFVFS+WorkerThread.GetFolderContentThread ()
[0x0]
in 
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3240
 


The application was terminated by a signal: SIGHUP

Code which did the nasty

8-->
private string createDialog()
{
OpenFileDialog filer = new OpenFileDialog();
filer.Filter = "spec files (*.spec)|*.spec";  
filer.Title = "Select a spec file"; 
return ( filer.ShowDialog() == DialogResult.OK )
? filer.FileName : null;
}

private void button1Click(object sender, EventArgs e)
{
createDialog();
}
<--8

Nothing nasty, it just doesn't behave!

Any ideas?

TTFN

Paul
-- 
Sie können mich aufreizen und wirklich heiß machen!


signature.asc
Description: This is a digitally signed message part
___
Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list