[Mono-bugs] [Bug 499887] TabControl.GotFocus event not fired when SelectionIndex is set

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon May 4 12:10:20 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=499887

User aaragoneses at novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=499887#c3


Andrés G. Aragoneses <aaragoneses at novell.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED




--- Comment #3 from Andrés G. Aragoneses <aaragoneses at novell.com>  2009-05-04 10:10:19 MDT ---
I've committed a fix for this in r133510, after calberto's approval, thanks!

For the record, before the commit, the test failed like this:

3) MonoTests.System.Windows.Forms.TabControlTest.SelectedIndexChangeFiresFocus
:   A1
  Expected string length 54 but was 39. Strings differ at index 0.
  Expected: "tc_OnGotFocus0;p2_OnEnter1;tc_OnSelectedIndexChanged1;"
  But was:  "p2_OnEnter1;tc_OnSelectedIndexChanged1;"
  -----------^

at MonoTests.System.Windows.Forms.TabControlTest.SelectedIndexChangeFiresFocus
() [0x0011b] in
/home/knocte/Documents/iDocs/Proyectos/mono/trunk/mcs/class/Managed.WindowsForms/Test/System.Windows.Forms/TabControlTest.cs:788
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
(object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x000ca] in
/home/knocte/Documents/iDocs/Proyectos/mono/trunk/mcs/class/corlib/System.Reflection/MonoMethod.cs:169


Following Carlos' recommendation, I tried relocating the Focus() call after the
call to OnSelecting, but this caused duplicated events and wrong order:


3) MonoTests.System.Windows.Forms.TabControlTest.SelectedIndexChangeFiresFocus
:   A1
  Expected string length 54 but was 66. Strings differ at index 0.
  Expected: "tc_OnGotFocus0;p2_OnEnter1;tc_OnSelectedIndexChanged1;"
  But was:  "p2_OnEnter1;p2_OnEnter1;tc_OnGotFocus1;tc_OnSelectedIndexChan.."
  -----------^

at MonoTests.System.Windows.Forms.TabControlTest.SelectedIndexChangeFiresFocus
() [0x0011b] in
/home/knocte/Documents/iDocs/Proyectos/mono/trunk/mcs/class/Managed.WindowsForms/Test/System.Windows.Forms/TabControlTest.cs:788
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
(object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x000ca] in
/home/knocte/Documents/iDocs/Proyectos/mono/trunk/mcs/class/corlib/System.Reflection/MonoMethod.cs:169


I'll backport to 2-4 in a while.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list