[MonoTouch] How to obtain message body
Jeff Stedfast
jeff at xamarin.com
Fri Mar 30 14:51:15 UTC 2012
Hi Rafael,
Try this:
void msgSelected (DialogViewController dvc, UITableView tv,
NSIndexPath path)
{
var body = ((MessageElement) dvc.Root[path.Section][path.Row]).Body;
}
Hope that helps,
Jeff
On Thu, Mar 29, 2012 at 7:45 PM, rafaelc <rafaelc_70 at hotmail.com> wrote:
> Hello, I´m using MessageElement class, using this code:
>
> while(dr.Read())
> {
> var line = new MessageElement (msgSelected)
> {
> Sender = dr.GetString (1),
> Subject = "",
> Body = dr.GetString (2),
> Date = dr.GetDateTime (3),
> NewFlag = false,
> MessageCount = 0
> };
> mensajesSection.Add(line);
> }
>
>
> I want to know how to show the complete body using the method
>
> void msgSelected (DialogViewController dvc, UITableView tv, NSIndexPath
> path)
> {
> // The message was selected
> // here I don´t know how to obtain the message body
> // I tried this
>
> //in debug mode I found Body property in tv.CellAt(path).Subviews[0]
>
> string msg = tv.CellAt(path).Subviews[0].Body; // compiler error
>
> }
>
>
>
> regards
>
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/How-to-obtain-message-body-tp4517449p4517449.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monotouch/attachments/20120330/ab7a0535/attachment-0001.html>
More information about the MonoTouch
mailing list