In Test/System.Windows.Forms:
authorChris Toshok <toshok@novell.com>
Thu, 17 May 2007 19:03:49 +0000 (19:03 -0000)
committerChris Toshok <toshok@novell.com>
Thu, 17 May 2007 19:03:49 +0000 (19:03 -0000)
commitc430b5d9a888fe95b8b50e341cf509dd4a84e0fc
treee1b064425b07a695a1e2aa277b57c0e8b491f8e6
parent7300d71bcae68439a5bae8ef3e18fbeb54ecf244
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.

svn path=/trunk/mcs/; revision=77594
13 files changed:
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Binding.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/BindingManagerBase.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ControlBindingsCollection.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms_test.dll.sources
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingManagerBaseTest.cs
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingTest.cs
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlBindingsCollectionTest.cs [new file with mode: 0644]
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CurrencyManagerTest.cs
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs