Propriété Custom bindée, fait planter Mono
Bonjour,
J'ai écrit ça :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
[ClassInterface(ClassInterfaceType.AutoDispatch), DefaultBindingProperty("Rtf"), Description("DescriptionRichTextBox"), ComVisible(true), Docking(DockingBehavior.Ask), Designer("System.Windows.Forms.Design.RichTextBoxDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public class CtlBindableRichTextBox : RichTextBox
{
[Localizable(true), Bindable(true), RefreshProperties(RefreshProperties.All), SettingsBindable(true), DefaultValue(""), Category("Appearance")]
new public string Rtf
{
get
{
return base.Rtf;
}
set
{
if ((value != null) && (value.StartsWith("{\\rtf", true, CultureInfo.CurrentCulture)))
{
base.Rtf = value;
}
else
{
base.Text = value;
}
}
} |
et j'ai bindé en mode design ma propriété Rtf sur un champ "Text" d'un dataset.
mais ca plante à l'exécution avec le message suivant :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
|
Unhandled Exception: System.ArgumentException: Cannot bind to property 'Text' on DataSource.
Parameter name: dataMember
at System.Windows.Forms.Binding.Check () [0x0018d] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Binding.cs:330
at System.Windows.Forms.Control.CheckDataBindings () [0x00029] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:1671
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5684
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.set_BindingContext (System.Windows.Forms.BindingContext value) [0x00013] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:2177
at System.Windows.Forms.ContainerControl.get_BindingContext () [0x0000b] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ContainerControl.cs:387
at System.Windows.Forms.Control.get_BindingContext () [0x0001f] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:2171
at System.Windows.Forms.Control.get_BindingContext () [0x0001f] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:2171
at System.Windows.Forms.Control.get_BindingContext () [0x0001f] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:2171
at System.Windows.Forms.Control.get_BindingContext () [0x0001f] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:2171
at System.Windows.Forms.DataGridView.get_DataManager () [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\DataGridView.cs:759
at System.Windows.Forms.DataGridView.ClearBinding () [0x00029] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\DataGridView.cs:6104
at System.Windows.Forms.DataGridView.ReBind () [0x00018] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\DataGridView.cs:6381
at System.Windows.Forms.DataGridView.OnBindingContextChanged (System.EventArgs e) [0x00007] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\DataGridView.cs:3478
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.ContainerControl.OnCreateControl () [0x00006] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ContainerControl.cs:566
at System.Windows.Forms.Form.OnCreateControl () [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Form.cs:2116
at System.Windows.Forms.Control.CreateControl () [0x000a3] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:3542
at System.Windows.Forms.Control.SetVisibleCore (Boolean value) [0x00043] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:4769
at System.Windows.Forms.Form.SetVisibleCore (Boolean value) [0x0007b] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Form.cs:2478
at System.Windows.Forms.Control.set_Visible (Boolean value) [0x0000c] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:3199
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:set_Visible (bool)
at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00059] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Application.cs:823
at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00014] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Application.cs:724
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Application.cs:707
at ZTAB.Program.Main () [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: Cannot bind to property 'Text' on DataSource.
Parameter name: dataMember
at System.Windows.Forms.Binding.Check () [0x0018d] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Binding.cs:330
at System.Windows.Forms.Control.CheckDataBindings () [0x00029] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:1671
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5684
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.set_BindingContext (System.Windows.Forms.BindingContext value) [0x00013] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:2177
at System.Windows.Forms.ContainerControl.get_BindingContext () [0x0000b] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ContainerControl.cs:387
at System.Windows.Forms.Control.get_BindingContext () [0x0001f] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:2171
at System.Windows.Forms.Control.get_BindingContext () [0x0001f] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:2171
at System.Windows.Forms.Control.get_BindingContext () [0x0001f] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:2171
at System.Windows.Forms.Control.get_BindingContext () [0x0001f] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:2171
at System.Windows.Forms.DataGridView.get_DataManager () [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\DataGridView.cs:759
at System.Windows.Forms.DataGridView.ClearBinding () [0x00029] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\DataGridView.cs:6104
at System.Windows.Forms.DataGridView.ReBind () [0x00018] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\DataGridView.cs:6381
at System.Windows.Forms.DataGridView.OnBindingContextChanged (System.EventArgs e) [0x00007] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\DataGridView.cs:3478
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.Control.OnParentBindingContextChanged (System.EventArgs e) [0x00027] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6115
at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e) [0x00031] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5688
at System.Windows.Forms.ContainerControl.OnCreateControl () [0x00006] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ContainerControl.cs:566
at System.Windows.Forms.Form.OnCreateControl () [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Form.cs:2116
at System.Windows.Forms.Control.CreateControl () [0x000a3] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:3542
at System.Windows.Forms.Control.SetVisibleCore (Boolean value) [0x00043] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:4769
at System.Windows.Forms.Form.SetVisibleCore (Boolean value) [0x0007b] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Form.cs:2478
at System.Windows.Forms.Control.set_Visible (Boolean value) [0x0000c] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:3199
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:set_Visible (bool)
at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00059] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Application.cs:823
at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00014] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Application.cs:724
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Application.cs:707
at ZTAB.Program.Main () [0x00000] in <filename unknown>:0 |
Ca fonctionne pourtant bien avec Visual.
Qu'est-ce qui ne va pas ?
D'avance merci,