protected override void AddStatementsToInitMethod (CodeMemberMethod method)
{
#if NET_2_0
+ CodeMethodInvokeExpression expr = new CodeMethodInvokeExpression (thisRef, "InitializeCulture");
+ method.Statements.Add (new CodeExpressionStatement (expr));
+
CodeArgumentReferenceExpression ctrlVar = new CodeArgumentReferenceExpression("__ctrl");
if (pageParser.Title != null)
method.Statements.Add (CreatePropertyAssign (ctrlVar, "Title", pageParser.Title));
}
}
+
+2007-01-04 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * Page.cs: fixed: InitializeCulture should be called
+ before creating controls.
+
2007-01-03 Marek Habersack <grendello@gmail.com>
* Page.cs: Make sure the ValidatorOnSubmit function is defined for the
previousPage = _context.LastPage;
_context.LastPage = this;
- InitializeCulture ();
_lifeCycle = PageLifeCycle.PreInit;
OnPreInit (EventArgs.Empty);
[TestFixtureSetUp]
public void SetUpTest ()
{
-#if DOT_NET
+#if VISUAL_STUDIO
WebTest.CopyResource (GetType (), "MonoTests.System.Web.UI.WebControls.Resources.PageCultureTest.aspx", "PageCultureTest.aspx");
WebTest.CopyResource (GetType (), "MonoTests.System.Web.UI.WebControls.Resources.PageLifecycleTest.aspx", "PageLifecycleTest.aspx");
WebTest.CopyResource (GetType (), "MonoTests.System.Web.UI.WebControls.Resources.PageValidationTest.aspx", "PageValidationTest.aspx");
if (eventlist == null)
Assert.Fail ("User data does not been created fail");
- Assert.AreEqual ("InitializeCulture", eventlist[0], "Live Cycle Flow #0");
+ Assert.AreEqual ("InitializeCulture:0", eventlist[0], "Live Cycle Flow #0");
Assert.AreEqual ("OnPreInit", eventlist[1], "Live Cycle Flow #1");
Assert.AreEqual ("OnInit", eventlist[2], "Live Cycle Flow #2");
Assert.AreEqual ("OnInitComplete", eventlist[3], "Live Cycle Flow #3");
{\r
if (WebTest.CurrentTest.UserData == null) {\r
ArrayList list = new ArrayList ();\r
- list.Add ("InitializeCulture");\r
+ list.Add ("InitializeCulture:" + this.Controls.Count);\r
WebTest.CurrentTest.UserData = list;\r
}\r
else {\r
ArrayList list = WebTest.CurrentTest.UserData as ArrayList;\r
if (list == null)\r
throw new NullReferenceException ();\r
- list.Add ("InitializeCulture");\r
+ list.Add ("InitializeCulture:" + this.Controls.Count);\r
WebTest.CurrentTest.UserData = list;\r
}\r
base.InitializeCulture ();\r