[Mono-bugs] [Bug 648893] New: EditText.Text.ToString() doesn't give you the contents of the text field

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Oct 24 18:19:17 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=648893

https://bugzilla.novell.com/show_bug.cgi?id=648893#c0


           Summary: EditText.Text.ToString() doesn't give you the contents
                    of the text field
    Classification: Mono
           Product: MonoDroid
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: gshackles at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Description of Problem:

If you call ToString() on the Text property of an EditText view, it will show
you a reference to the object rather than the contents of the property.  For
example:

  var editText = new EditText(this);
  editText.Text = "testing";
  Log.D("ToString Test", editText.Text.ToString());
  Log.D("ToString Test", new string(editText.Text.ToArray()));

outputs the following:

  D/ToString Test(  578): android.text.SpannableStringBuilder at 43d1c730
  D/ToString Test(  578): testing

I'm not sure if this applies to other places in the API that use
IEnumerable<char> or not.


Actual Results:

A string describing the SpannableStringBuilder object

Expected Results:

A string containing the contents of the property

How often does this happen? 

Always

-- 
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.


More information about the mono-bugs mailing list