Re: [Mono-list] TypeConverter cannot convert from System.String in 2.0 preview 1

2008-08-04 Thread Andrus
> If it runs on MS.NET but doesn't run on mono then it's a bug of ours.
> Can you please make a *small* self-contained test case out of your
> application by extracting only the part that causes the exception and
> then file a bug with it (attach it to the bug) -
> http://mono-project.com/Bugs. Then post the bug number.

Done !

https://bugzilla.novell.com/show_bug.cgi?id=414445
https://bugzilla.novell.com/show_bug.cgi?id=414446

Andrus.



___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] TypeConverter cannot convert from System.String in 2.0 preview 1

2008-08-04 Thread Ivan N. Zlatev
On Mon, Aug 4, 2008 at 5:08 PM, Andrus <[EMAIL PROTECTED]> wrote:
> My WinForms application does not start with 2.0 preview 1. Exception is
> below.

If it runs on MS.NET but doesn't run on mono then it's a bug of ours.
Can you please make a *small* self-contained test case out of your
application by extracting only the part that causes the exception and
then file a bug with it (attach it to the bug) -
http://mono-project.com/Bugs. Then post the bug number.

-- 
Kind Regards,
Ivan N. Zlatev

> Maybe this is because I store Font object in user settings:
>
>[global::System.Configuration.UserScopedSettingAttribute()]
>[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
>[global::System.Configuration.DefaultSettingValueAttribute("Arial,
> 15pt")]
>public global::System.Drawing.Font TextBoxFont {
>get {
>return ((global::System.Drawing.Font)(this["TextBoxFont"]));
>}
>set {
>this["TextBoxFont"] = value;
>}
>}
>
>
> How to fix ?
>
> Andrus.
>
> Unhandled Exception: System.TypeInitializationException: An exception was
> thrown by the type initializer for
> MyApplication.Windows.Forms.Properties.Settings --->
> System.NotSupportedException: TypeConverter cannot convert from
> System.String.
>
>  at System.ComponentModel.TypeConverter.GetConvertFromException
> (System.Object value) [0x0]
>  at System.ComponentModel.TypeConverter.ConvertFrom (ITypeDescriptorContext
> context, System.Globalization.CultureInfo culture, System.Object value)
> [0x0]
>  at System.ComponentModel.TypeConverter.ConvertFrom (System.Object o)
> [0x0]
>  at System.ComponentModel.TypeConverter.ConvertFromString (System.String
> text) [0x0]
>  at System.Configuration.ApplicationSettingsBase.CreateSettingsProperty
> (System.Reflection.PropertyInfo prop,
> System.Configuration.SettingsPropertyCollection properties,
> System.Configuration.LocalFileSettingsProvider& local_provider) [0x0]
>  at System.Configuration.ApplicationSettingsBase.get_Properties ()
> [0x0]
>  at System.Configuration.ApplicationSettingsBase..ctor () [0x0]
>  at MyApplication.Windows.Forms.Properties.Settings..ctor () [0x0]
>  at MyApplication.Windows.Forms.Properties.Settings..cctor () [0x0]
>
>  --- End of inner exception stack trace ---
>
>  at MyApplication.Windows.Forms.UserLoginForm.InitializeComponent ()
> [0x0]
>  at MyApplication.Windows.Forms.UserLoginForm..ctor () [0x0]
>  at (wrapper remoting-invoke-with-check)
> MyApplication.Windows.Forms.UserLoginForm:.ctor ()
>  at MyApplication.Windows.Forms.AppMainEntry.Main () [0x0]
>
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] TypeConverter cannot convert from System.String in 2.0 preview 1

2008-08-04 Thread Andrus
My WinForms application does not start with 2.0 preview 1. Exception is
below.
Maybe this is because I store Font object in user settings:

[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Arial,
15pt")]
public global::System.Drawing.Font TextBoxFont {
get {
return ((global::System.Drawing.Font)(this["TextBoxFont"]));
}
set {
this["TextBoxFont"] = value;
}
}


How to fix ?

Andrus.

Unhandled Exception: System.TypeInitializationException: An exception was
thrown by the type initializer for
MyApplication.Windows.Forms.Properties.Settings --->
System.NotSupportedException: TypeConverter cannot convert from
System.String.

  at System.ComponentModel.TypeConverter.GetConvertFromException
(System.Object value) [0x0]
  at System.ComponentModel.TypeConverter.ConvertFrom (ITypeDescriptorContext
context, System.Globalization.CultureInfo culture, System.Object value)
[0x0]
  at System.ComponentModel.TypeConverter.ConvertFrom (System.Object o)
[0x0]
  at System.ComponentModel.TypeConverter.ConvertFromString (System.String
text) [0x0]
  at System.Configuration.ApplicationSettingsBase.CreateSettingsProperty
(System.Reflection.PropertyInfo prop,
System.Configuration.SettingsPropertyCollection properties,
System.Configuration.LocalFileSettingsProvider& local_provider) [0x0]
  at System.Configuration.ApplicationSettingsBase.get_Properties ()
[0x0]
  at System.Configuration.ApplicationSettingsBase..ctor () [0x0]
  at MyApplication.Windows.Forms.Properties.Settings..ctor () [0x0]
  at MyApplication.Windows.Forms.Properties.Settings..cctor () [0x0]

  --- End of inner exception stack trace ---

  at MyApplication.Windows.Forms.UserLoginForm.InitializeComponent ()
[0x0]
  at MyApplication.Windows.Forms.UserLoginForm..ctor () [0x0]
  at (wrapper remoting-invoke-with-check)
MyApplication.Windows.Forms.UserLoginForm:.ctor ()
  at MyApplication.Windows.Forms.AppMainEntry.Main () [0x0]

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list