As promised, here is what i come up with :
> if you look at the javascript file List.js, you'll see that chunk of code:
= ---------- =
....
List.prototype.reloadData = function()
{
var self = this;
var templateRow = this.templateRowElement;
if (!templateRow) return;
var useTemplateAsRow = dashcode.inDesign;
if (!useTemplateAsRow) {
templateRow.style.visibility = "hidden";
templateRow.style.display = "";
}
// remove all children except for the template row
var list = this.element;
var child = list.firstChild;
var dataSource = this.dataSource;
while (child) {
var nextChild = child.nextSibling;
if (child != templateRow) {
list.removeChild(child);
}
child = nextChild;
}
this.rows = [];
var cloneAndStyleRow
....
=------------=
the interesting part is where the data are removed in order to reload
the data, i.e.
while (child) {
var nextChild = child.nextSibling;
if (child != templateRow) {
list.removeChild(child);
}
child = nextChild;
}
so what you want to do is skip this part to append the data to the
list, which you can do by adding a if condition :
List.prototype.reloadData = function(condition)
....
if(condition){
while (child) {
var nextChild = child.nextSibling;
if (child != templateRow) {
list.removeChild(child);
}
child = nextChild;
}
this.rows = [];
}
I choose condition to be a 1 or 0.
Then then only (and that's the longest part) job remaining is to add a
condition to every call to the reloadData function in the List.js and
in your own javascript file.
I am no javascript guru, so it might be another solution that works
much better. Anyway, I hope my message made sense.
You can see the video app I did at the following URL :
http://labs.searchmic.com/iphone/. I haven't yet figure out what
memory issue i have to make the app crashed when too much videos are
displayed.
Thanks and I hope it helped you
--
JB
On Aug 14, 9:11 am, JB <[EMAIL PROTECTED]> wrote:
> Hey
> i was able to do what i wanted and my video webapp is almost done. It
> is indeed very simple to solve the issue.
> One big difference between the youtube app and webapp is that the
> webapp run under safari mobile.
> When a lot of data (especially complex one) are shown, safari mobile
> tends to slow the webapp a lot.
> My guess is that it is a memory issue (http://yuiblog.com/blog/
> 2008/02/06/iphone-cacheability/ for a memory performance review of the
> iphone) and i have not managed to solve it.
> I'll be adding the code to make data append to lists using Apple
> dashcode code soon...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---