Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var newArray = new Array();
- for(var i=0;i<fileUrls.length;++i) {
- var url = fileUrls[i];
- var x = [];//new Array();
- x = [url,
- function(){
- displayFile(url, 'image', null, ft_id, null, null, null, null, !MA.isiOS());
- },
- function(e){
- if(DEBUG) console.log('Error creating gallery thumbnail');
- alert('There was a problem creating a thumbnail');
- MA.hideMessage();
- }
- ];
- newArray.push(x);
- }
- pollingThrottler(2,newArray, function(a,b,c){
- //alert(a+"n-----n"+b+"n-----n"+c);
- //alert(bentleyPlugins.createThumbnailForPath(a,b,c));
- //alert(a);
- //a does not reference the correct item.
- createThumbnailForPath(a,b,c);
- return;
- },function(){
- alert("success!");
- });
- function genElement( url ) {
- return [url,
- function(){
- displayFile(url, 'image', null, ft_id, null, null, null, null, !MA.isiOS());
- },
- function(e){
- if(DEBUG) console.log('Error creating gallery thumbnail');
- alert('There was a problem creating a thumbnail');
- MA.hideMessage();
- }
- ];
- }
- arrayList.push( genElement( myUrl ) );
- function Thing(url) {
- this.url = url;
- }
- Thing.prototype.display = function(){
- displayFile(this.url, 'image', null, ft_id, null, null, null, null, !MA.isiOS());
- };
- Thing.prototype.doSomething = function(){
- if(DEBUG) console.log('Error creating gallery thumbnail');
- alert('There was a problem creating a thumbnail');
- MA.hideMessage();
- };
- arrayList.push(new Thing(url));
- Thing.prototype.asArray = function(){
- var _this = this;
- return [this.url, function(){_this.display()}, this.doSomething];
- }
Add Comment
Please, Sign In to add comment