Progress?? Impossible.
Posted: May 28th, 2009 | Author: Jay | Filed under: Milestone i | Tags: JavaScript, media-page.js | No Comments »1 2 3 4 5 6 | for(var i=0;i<=10000;i++) { if(!this._mediaListView.getItemByIndex(i)) break; var randArtist = document.createElement('label'); randArtist.setAttribute('value', this._mediaListView.getItemByIndex(i).getProperty(SBProperties.artistName)); var mediaViewBox = document.getElementById("artistcloud-media-page-box"); mediaViewBox.appendChild(randArtist); } |
This code successfully lists all the artists in the current media list! Granted, they are heavily duplicated, because it lists the artist for each item in the list. And the Media View is not scrollable (probably need to set overflow: auto in some CSS?). And there is probably a much more efficient way to get this list. And it makes the media list itself disappear. And 10000 is a totally arbitrary number. But it’s something. (Is it obvious that I grew up on BASIC?)
How can I get a count of the number of items in this._mediaListView?

Leave a Reply