In Test/System.Windows.Forms:
commit73ad1acdc4cadb298b383e429b9a5ca7cee2dfcd
authortoshok <toshok@e3ebcda4-bce8-0310-ba0a-eca2169e7518>
Thu, 17 May 2007 19:03:49 +0000 (17 19:03 +0000)
committertoshok <toshok@e3ebcda4-bce8-0310-ba0a-eca2169e7518>
Thu, 17 May 2007 19:03:49 +0000 (17 19:03 +0000)
tree94758ace7dc1e42ed07cfaddfe8ab71412770828
parent442537c94f84c582a8997852b7d2cc23d9269bde
In Test/System.Windows.Forms:
2007-05-17  Chris Toshok  <toshok@ximian.com>

* ControlBindingsCollectionTest.cs: new test file, move a test
from BindingTest here.

* BindingTest.cs (DuplicateBindingAdd): move the test to
ControlBindingsCollectionTest.

* BindingManagerBaseTest.cs (BindingsTest): enable this test.
passes now.

* DataBindingTests.cs: define #WITH_BINDINGS, since we now seem to
work with them.
(TestInsertRowBeforeCurrent): ignore this test on 2.0 though, as
we generate too many Binding.Format events.
(TestColumnAdd): ignore this test on 1.1, until System.Data
generates the proper (2) number of events causing us to emit
MetadataChanged.

* CurrencyManagerTest.cs (AddNew2): ignore this test for the time
being.  it's hitting a System.Data exception which doesn't happen
on MS.

In System.Windows.Forms:
2007-05-17  Chris Toshok  <toshok@ximian.com>

* Control.cs (CheckDataBindings): remove the binding_context arg
to binding.Check.

* CurrencyManager.cs (OnItemChanged): fix this now that
BindingManagerBase is fixed. also remove the comment telling where
the fix should go.  We set transfering_data to true/false around
the call to PushData to keep UpdateIsBinding from being called.
(ListChangedHandler): remove the extra OnMetaDataChanged call for
PropertyDescriptorAdded in the 1.1 case.  The extra call is
actually generated by System.Data generating 2 metadata changed
events of its own per column add.  The fix should go there.  Add a
comment to that affect in our test's Assert.Ignore.

* BindingManagerBase.cs: Rework PullData and PushData slightly.
we keep a boolean flag (transfering_data) that keeps us from
calling UpdateIsBinding multiple times if we re-enter either of
them.

* ControlBindingsCollection.cs (AddCore): remove the
binding_context arg to binding.Check.

* Binding.cs (IsBinding): don't check if we're binding here, just
return our cached value.  we update it in UpdateIsBinding.
(Check): don't take the binding_context arg, we'll just use our
control's.  Also, for some reason MS doesn't use the data member
field when getting the bindingmanager for this binding.  it just
uses the datasource.  Make this method callable multiple times,
and only do the is_null_desc stuff if manager.Position != -1 (so
we don't get an exception accessing manager.Current).
(UpdateIsBinding): move the code from IsBinding here.
(PositionChangedHandler): call Check here to we can initialize
things that require a non- -1 position.

git-svn-id: svn+ssh://mono-cvs.ximian.com/source/trunk/mcs@77594 e3ebcda4-bce8-0310-ba0a-eca2169e7518
13 files changed:
class/Managed.Windows.Forms/System.Windows.Forms/Binding.cs
class/Managed.Windows.Forms/System.Windows.Forms/BindingManagerBase.cs
class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
class/Managed.Windows.Forms/System.Windows.Forms/ControlBindingsCollection.cs
class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs
class/Managed.Windows.Forms/System.Windows.Forms_test.dll.sources
class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingManagerBaseTest.cs
class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingTest.cs
class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlBindingsCollectionTest.cs [copied from class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingManagerBaseTest.cs with 56% similarity]
class/Managed.Windows.Forms/Test/System.Windows.Forms/CurrencyManagerTest.cs
class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs