https://bugzilla.novell.com/show_bug.cgi?id=412536
User [EMAIL PROTECTED] added comment https://bugzilla.novell.com/show_bug.cgi?id=412536#c2 Steve Odbc <[EMAIL PROTECTED]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[EMAIL PROTECTED] Summary|Timers tick before Form.OnLoad is called |[PATCH] Timers tick before Form.OnLoad is called --- Comment #2 from Steve Odbc <[EMAIL PROTECTED]> 2008-10-12 23:48:23 MDT --- Possible Patch: In MONO, the Form class has a private field that is called "is_loaded". You might check it from the FireTick() method of the Timer, using the following reflection code: internal void FireTick () { EventHandler SavedOnTick = OnTick; if (SavedOnTick != null) { object TargetClass = SavedOnTick.Target; if (TargetClass.GetType().IsSubclassOf(typeof(Form))) { FieldInfo IsLoadedField = typeof(Form).GetField("is_loaded", BindingFlags.Instance | BindingFlags.NonPublic); // are we ready yet? if (!(bool)IsLoadedField.GetValue(TargetClass)) return; } SavedOnTick (EventArgs.Empty); } } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
