[MonoTouch] URGENT :( Serious Problem with UITableview loading
Wally McClure
theevilprogrammer at hotmail.com
Tue Oct 25 10:00:12 EDT 2011
What Nic said. If you are loading content over the internet directly into a cell, its got to go on another thread. There are numerous options you can use:1. Use another thread. Get the loading off the main ui thread.2. Cache data locally. Don't go get the same resource more than once unless you really need to.3. Do something async, though, this really goes back to "Use another thread."
I've got an article introducing the uitableview coming out where I talk about this issue.
Wally
> Date: Tue, 25 Oct 2011 14:25:54 +0100
> From: nicw at fastchicken.co.nz
> To: info at ploetzeneder-it.com
> CC: monotouch at lists.ximian.com
> Subject: Re: [MonoTouch] URGENT :( Serious Problem with UITableview loading
>
> What does this do?
>
> cells [indexPath.Row].Loaddata(etc etc etc)
>
> (or rather: cells [indexPath.Row].Loaddata(und so weiter und so
> weiter) if I remember my German)
>
> I'm assuming it's calling a web service or loading from the database?
> If it is, you MUST move this into another thread, so your cell is
> returned immediatly, and the cell is refreshed when the data is
> available.
>
> These might help
>
> http://www.shrinkrays.net/articles/monotouch-controllers-by-example/uitableviewcontroller-by-example.aspx
> http://tirania.org/monomac/archive/2011/Jan-18.html
>
> esp this one:
> http://simon.nureality.ca/simon-says-monotouch-downloading-images-like-appstore-app-in-less-than-50-lines-with-coreanimation-transitions/
>
> as he's loading the images on another thread, then calling into the
> main one to display it.
>
>
> On Tue, Oct 25, 2011 at 14:03, Andreas Ploetzeneder
> <info at ploetzeneder-it.com> wrote:
> > http://pastebin.com/2Yhz7xsg
> >
> > 2011/10/25 Nic Wise <nicw at fastchicken.co.nz>
> >>
> >> Also, you might want to post some of your table code (eg the GetCell
> >> call?) to pastebin.com or in a github gist....
> >>
> >> are you using MonoTouch.Dialog? If not, why not?
> >>
> >> On Tue, Oct 25, 2011 at 12:11, Nic Wise <nicw at fastchicken.co.nz> wrote:
> >> > yeah, the green one starts out undrawn, then comes in. Looks to me
> >> > like a background thread is doing the update, but hasn't finished by
> >> > the time it needs to be drawn..... It IS scrolling smoothly, tho,
> >> > which is good - if you are doing too much in the main thread, it gets
> >> > stutter-y
> >> >
> >> > 2011/10/25 Tomasz Cielecki <tomasz at ostebaronen.dk>:
> >> >> Tried using SetNeedsDisplay() to refresh the table? Also make sure
> >> >> youare refreshing the Table on the correct thread.
> >> >> 2011/10/25 Andreas Ploetzeneder <info at ploetzeneder-it.com>:
> >> >>> reloaddata on viewdidload and otherwise,always if a cell is called, a
> >> >>> value
> >> >>> from an instance is got...
> >> >>> cell.Loaddata(Datenverwaltung.historydaten [indexPath.Row].Message....
> >> >>>
> >> >>> TableView.DataSource = new HaupttabelleDataSource(this,history,root);
> >> >>> TableView.ReloadData();
> >> >>>
> >> >>> 2011/10/25 Tomasz Cielecki <tomasz at ostebaronen.dk>
> >> >>>>
> >> >>>> How are you refreshing the table?
> >> >>>>
> >> >>>> 2011/10/25 Nic Wise <nicw at fastchicken.co.nz>:
> >> >>>> > tried it, but it's 404 :(
> >> >>>> >
> >> >>>> > 2011/10/25 Andreas Ploetzeneder <info at ploetzeneder-it.com>:
> >> >>>> >> i got it :)
> >> >>>> >> www.ploetzeneder-it.com/scrollingproblem.mov
> >> >>>> >>
> >> >>>> >>
> >> >>>> >> 2011/10/25 Rolf Bjarne Kvinge <rolf at xamarin.com>
> >> >>>> >>>
> >> >>>> >>> Hi,
> >> >>>> >>>
> >> >>>> >>> If you install Jing (http://www.techsmith.com/jing/) you can
> >> >>>> >>> upload
> >> >>>> >>> videos to their site and just publish the link here.
> >> >>>> >>>
> >> >>>> >>> Rolf
> >> >>>> >>>
> >> >>>> >>> On Tue, Oct 25, 2011 at 11:28 AM, Andreas Ploetzeneder
> >> >>>> >>> <info at ploetzeneder-it.com> wrote:
> >> >>>> >>> > I worry, i cannot attach a video. But i can mail it to somebody
> >> >>>> >>> > directly, if
> >> >>>> >>> > needed.
> >> >>>> >>> > _______________________________________________
> >> >>>> >>> > MonoTouch mailing list
> >> >>>> >>> > MonoTouch at lists.ximian.com
> >> >>>> >>> > http://lists.ximian.com/mailman/listinfo/monotouch
> >> >>>> >>> >
> >> >>>> >>> >
> >> >>>> >>> _______________________________________________
> >> >>>> >>> MonoTouch mailing list
> >> >>>> >>> MonoTouch at lists.ximian.com
> >> >>>> >>> http://lists.ximian.com/mailman/listinfo/monotouch
> >> >>>> >>
> >> >>>> >>
> >> >>>> >>
> >> >>>> >> --
> >> >>>> >>
> >> >>>> >>
> >> >>>> >>
> >> >>>> >>
> >> >>>> >>
> >> >>>> >> Mit freundlichem Gruß,
> >> >>>> >>
> >> >>>> >> Andreas Plötzeneder
> >> >>>> >> CEO
> >> >>>> >> ihr ploetzeneder it-solutions Team
> >> >>>> >> Mobile Development – Desktopanwendungen – Webanwendungen
> >> >>>> >> Tel: +43 720 30 30 24 10
> >> >>>> >> Fax: +43 720 30 30 24 20
> >> >>>> >> Email: info at ploetzeneder-it.com
> >> >>>> >> web: http://www.ploetzeneder-it.com
> >> >>>> >>
> >> >>>> >> Der Inhalt dieser E-Mail samt aller Anhänge ist vertraulich
> >> >>>> >> und ausschließlich für den Adressaten bestimmt. Wenn Sie nicht der
> >> >>>> >> vorgesehene Adressat dieser E-Mail oder dessen Vertreter sind, so
> >> >>>> >> löschen
> >> >>>> >> sie diese bitte und informieren Sie den Absender. Jede Form der
> >> >>>> >> Verbreitung
> >> >>>> >> oder Veröffentlichung der E-Mail, sei es in ihrer Gesamtheit oder
> >> >>>> >> in
> >> >>>> >> Teilen,
> >> >>>> >> die nicht ihrem Zweck dient, ist unzulässig. Das Internet kann die
> >> >>>> >> Unversehrtheit dieser Mitteilung nicht garantieren. ploetzeneder
> >> >>>> >> it-solutions übernimmt daher keine Haftung, falls die
> >> >>>> >> E-Mail geändert
> >> >>>> >> wurde.
> >> >>>> >>
> >> >>>> >>
> >> >>>> >>
> >> >>>> >> _______________________________________________
> >> >>>> >> MonoTouch mailing list
> >> >>>> >> MonoTouch at lists.ximian.com
> >> >>>> >> http://lists.ximian.com/mailman/listinfo/monotouch
> >> >>>> >>
> >> >>>> >>
> >> >>>> >
> >> >>>> >
> >> >>>> >
> >> >>>> > --
> >> >>>> > Nic Wise
> >> >>>> > t. +44 7788 592 806 | @fastchicken |
> >> >>>> > http://www.linkedin.com/in/nicwise
> >> >>>> > b. http://www.fastchicken.co.nz/
> >> >>>> >
> >> >>>> > Nearest Bus: find when the next bus is coming to your stop.
> >> >>>> > http://goo.gl/Vcz1p
> >> >>>> > mobileAgent (for FreeAgent): get your accounts in your pocket.
> >> >>>> > http://goo.gl/IuBU
> >> >>>> > Trip Wallet: Keep track of your budget on the go:
> >> >>>> > http://goo.gl/ePhKa
> >> >>>> > London Bike App: Find the nearest Boris Bike, and get riding!
> >> >>>> > http://goo.gl/Icp2
> >> >>>> > _______________________________________________
> >> >>>> > MonoTouch mailing list
> >> >>>> > MonoTouch at lists.ximian.com
> >> >>>> > http://lists.ximian.com/mailman/listinfo/monotouch
> >> >>>> >
> >> >>>>
> >> >>>>
> >> >>>>
> >> >>>> --
> >> >>>> Med Venlig Hilsen / With Best Regards
> >> >>>> Tomasz Cielecki
> >> >>>> http://ostebaronen.dk
> >> >>>> _______________________________________________
> >> >>>> MonoTouch mailing list
> >> >>>> MonoTouch at lists.ximian.com
> >> >>>> http://lists.ximian.com/mailman/listinfo/monotouch
> >> >>>
> >> >>>
> >> >>>
> >> >>> --
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>> Mit freundlichem Gruß,
> >> >>>
> >> >>> Andreas Plötzeneder
> >> >>> CEO
> >> >>> ihr ploetzeneder it-solutions Team
> >> >>> Mobile Development – Desktopanwendungen – Webanwendungen
> >> >>> Tel: +43 720 30 30 24 10
> >> >>> Fax: +43 720 30 30 24 20
> >> >>> Email: info at ploetzeneder-it.com
> >> >>> web: http://www.ploetzeneder-it.com
> >> >>>
> >> >>> Der Inhalt dieser E-Mail samt aller Anhänge ist vertraulich
> >> >>> und ausschließlich für den Adressaten bestimmt. Wenn Sie nicht der
> >> >>> vorgesehene Adressat dieser E-Mail oder dessen Vertreter sind, so
> >> >>> löschen
> >> >>> sie diese bitte und informieren Sie den Absender. Jede Form der
> >> >>> Verbreitung
> >> >>> oder Veröffentlichung der E-Mail, sei es in ihrer Gesamtheit oder in
> >> >>> Teilen,
> >> >>> die nicht ihrem Zweck dient, ist unzulässig. Das Internet kann die
> >> >>> Unversehrtheit dieser Mitteilung nicht garantieren. ploetzeneder
> >> >>> it-solutions übernimmt daher keine Haftung, falls die E-Mail geändert
> >> >>> wurde.
> >> >>>
> >> >>>
> >> >>>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Med Venlig Hilsen / With Best Regards
> >> >> Tomasz Cielecki
> >> >> http://ostebaronen.dk
> >> >> _______________________________________________
> >> >> MonoTouch mailing list
> >> >> MonoTouch at lists.ximian.com
> >> >> http://lists.ximian.com/mailman/listinfo/monotouch
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Nic Wise
> >> > t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
> >> > b. http://www.fastchicken.co.nz/
> >> >
> >> > Nearest Bus: find when the next bus is coming to your stop.
> >> > http://goo.gl/Vcz1p
> >> > mobileAgent (for FreeAgent): get your accounts in your pocket.
> >> > http://goo.gl/IuBU
> >> > Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
> >> > London Bike App: Find the nearest Boris Bike, and get riding!
> >> > http://goo.gl/Icp2
> >> >
> >>
> >>
> >>
> >> --
> >> Nic Wise
> >> t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
> >> b. http://www.fastchicken.co.nz/
> >>
> >> Nearest Bus: find when the next bus is coming to your stop.
> >> http://goo.gl/Vcz1p
> >> mobileAgent (for FreeAgent): get your accounts in your pocket.
> >> http://goo.gl/IuBU
> >> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
> >> London Bike App: Find the nearest Boris Bike, and get riding!
> >> http://goo.gl/Icp2
> >> _______________________________________________
> >> MonoTouch mailing list
> >> MonoTouch at lists.ximian.com
> >> http://lists.ximian.com/mailman/listinfo/monotouch
> >
> >
> >
> > --
> >
> >
> >
> >
> >
> > Mit freundlichem Gruß,
> >
> > Andreas Plötzeneder
> > CEO
> > ihr ploetzeneder it-solutions Team
> > Mobile Development – Desktopanwendungen – Webanwendungen
> > Tel: +43 720 30 30 24 10
> > Fax: +43 720 30 30 24 20
> > Email: info at ploetzeneder-it.com
> > web: http://www.ploetzeneder-it.com
> >
> > Der Inhalt dieser E-Mail samt aller Anhänge ist vertraulich
> > und ausschließlich für den Adressaten bestimmt. Wenn Sie nicht der
> > vorgesehene Adressat dieser E-Mail oder dessen Vertreter sind, so löschen
> > sie diese bitte und informieren Sie den Absender. Jede Form der Verbreitung
> > oder Veröffentlichung der E-Mail, sei es in ihrer Gesamtheit oder in Teilen,
> > die nicht ihrem Zweck dient, ist unzulässig. Das Internet kann die
> > Unversehrtheit dieser Mitteilung nicht garantieren. ploetzeneder
> > it-solutions übernimmt daher keine Haftung, falls die E-Mail geändert wurde.
> >
> >
> >
>
>
>
> --
> Nic Wise
> t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
> b. http://www.fastchicken.co.nz/
>
> Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
> mobileAgent (for FreeAgent): get your accounts in your pocket.
> http://goo.gl/IuBU
> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
> London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
> _______________________________________________
> 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/20111025/6a4ac05a/attachment-0001.html
More information about the MonoTouch
mailing list