Lively Kernel canvas
//
savefalsenull
true
DraftSavingFeedback40
nullnullNaN
NaN
NaN
10006.4740875482994635Wikicontroltrue
//GiveFeedbackonSavingWorldMorph.addMethods({saveWorld:function(optURL){optURL=optURL||URL.source.filename()varstart=newDate().getTime();varself=this;varonFinished=function(){vartime=newDate().getTime()-start;self.setStatusMessage("worldsavedto"+optURL+"in"+time+"ms",Color.green,3)}varstatusMessage=WorldMorph.current().setStatusMessage("serializing....");(function(){vardoc=Exporter.shrinkWrapMorph(this.world());statusMessage.remove();(function(){Exporter.stripEpimorphs(doc);Exporter.saveDocumentToFile(doc,optURL,onFinished);}).bind(this).delay(0);}).bind(this).delay(0);returnoptURL},});Object.extend(Exporter,{saveDocumentToFile:function(doc,filename,callback){console.group("savedocument(draft)")if(!filename)returnnull;if(!filename.endsWith('.xhtml')){filename+=".xhtml";console.log("changedurlto"+filename+"forbase"+URL.source);}varurl=URL.source.withFilename(filename);varr=newWebResource(url);r.enableShowingProgress();connect(r,'status',this,'showSaveStatus');//TODOaddprogressbarvarprogressBar=WorldMorph.current().showStatusProgress("");progressBar.setLabel("saving"+filename);progressBar.setValue(0);connect(r,'progress',progressBar,'setValue',{converter:function(rpe){return(rpe.loaded/rpe.total)}});varonFinishedObj={callback:function(status){progressBar.setValue(1);callback(status)}};connect(r,'status',onFinishedObj,'callback');r.beAsync().put(doc,undefined,true)returnurl;},})
nulltruetruetruefalsetruetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
falsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
dismissallfalsenulltruefalsetrue
null
Xfalsenulltruefalsetrue
serializing....16nullnull96