Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save SuperYeti/878651 to your computer and use it in GitHub Desktop.
Save SuperYeti/878651 to your computer and use it in GitHub Desktop.
Fix for EntryElement
From aacc03da34585629ae98d92af05afe1c495126af Mon Sep 17 00:00:00 2001
From: Warren Moxley <[email protected]>
Date: Sun, 20 Mar 2011 13:29:40 -0700
Subject: [PATCH] Fixed EntryElement. Currently when you passed in a default value it was not displaying it, as GetCell was getting the value after the EntryElement was created, thus returning the existing Entry value per the way the getter and setter were created. This has been fixed.
---
MonoTouch.Dialog/Elements.cs | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/MonoTouch.Dialog/Elements.cs b/MonoTouch.Dialog/Elements.cs
index dd04f1c..cffcd22 100644
--- a/MonoTouch.Dialog/Elements.cs
+++ b/MonoTouch.Dialog/Elements.cs
@@ -1266,9 +1266,9 @@ namespace MonoTouch.Dialog
var _entry = new UITextField (new RectangleF (size.Width, (cell.ContentView.Bounds.Height-size.Height)/2-1, 320-size.Width, size.Height)){
Tag = 1,
Placeholder = placeholder ?? "",
- SecureTextEntry = isPassword
+ SecureTextEntry = isPassword,
+ Text = Value ?? ""
};
- _entry.Text = Value ?? "";
entry = _entry;
entry.AutoresizingMask = UIViewAutoresizing.FlexibleWidth |
--
1.7.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment