Lively Kernel canvas
Savefalsenull
truenullfalse
Loggedin
Saveas...falsenullfalsenull
10000.06188675987113162Wikicontroltrue
10000.49190341218111366Wikicontroltrue
100012.765660659574722Wikicontroltrue
nullfalsetruenullfalse
lively.webcollab.agent.WebCollabAgent:privateOnLoginAndReceivefalsenullfalse
false
false
falsenullfalse
localrequirementsfalsetruefalse0false
initializerfalsetruefalse0false
TestRunner2falsetruefalse0false
webcollabextensionsfalsetruefalse0false
lively.webcollab.agent.WebCollabAgentfalsetruefalse0false
helperfalsetruefalse0false3104nullnulltruefalsenullnulltruetrue
1true
null
null
null
nulltruetrue
initializefalsetruefalse0false
isLoggedInfalsetruefalse0false
configfalsetruefalse0false
loginfalsetruefalse0false
logoutfalsetruefalse0false
broadcastfalsetruefalse0false
resetfalsetruefalse0false
setupTestStreamfalsetruefalse0false
getDocumentfalsetruefalse0false
deleteDocumentfalsetruefalse0false
privateOnLoginAndReceivefalsetruefalse0false
privateOnStreamClosefalsetruefalse0false
privateOnLogoutfalsetruefalse0false
testStreamCloseCbfalsetruefalse0false
performActionfalsetruefalse0false
makeRequestfalsetruefalse0false31010nullnulltruefalsenullnulltruetrue
1true
null
null
null
nulltruetrue
privateOnLoginAndReceive:function(req,newText,reqTextPos){if(req.status>400)thrownewError('Errorinlogin/receivefromstream.Message:'+newText);//newTextcanbealistofcrlfseparatedjsonmessages//callonLogin/onReceivejustwithonejsonobjatatimevarmessages=newText.split('\r\n');messages.pop();//removelastemptystringmessages.forEach(function(message){varjson=lively.webcollab.parseJson(message);if(reqTextPos===0||json.isLoginMessage/*FIXMEunderheavyloadreqTextPosnot0whenloginresponsearrives*/){this._isLoggedIn=json&&json.isSuccess;this.config().onLogin&&this.config().onLogin(req);}else{this.config().onReceive&&this.config().onReceive(json);}},this);}, 400) \n\t\tthrow new Error('Error in login/receive from stream. Message: ' + newText);\n\n\t// newText can be a list of cr lf separated json messages\n\t// call onLogin/onReceive just with one json obj at a time\n\tvar messages = newText.split('\\r\\n');\n\tmessages.pop(); // remove last empty string\n\tmessages.forEach(function(message) {\n\t\tvar json = lively.webcollab.parseJson(message);\n\t\tif (reqTextPos === 0 || json.isLoginMessage /*FIXME under heavy load reqTextPos not 0 when login response arrives*/) {\n\t\t\tthis._isLoggedIn = json && json.isSuccess;\n\t\t\tthis.config().onLogin && this.config().onLogin(req);\n\t\t} else {\n\t\t\tthis.config().onReceive && this.config().onReceive(json);\n\t\t}\n\t}, this);\n},"]]>15truetrue2000000 400) \n\t\tthrow new Error('Error in login/receive from stream. Message: ' + newText);\n\n\t// newText can be a list of cr lf separated json messages\n\t// call onLogin/onReceive just with one json obj at a time\n\tvar messages = newText.split('\\r\\n');\n\tmessages.pop(); // remove last empty string\n\tmessages.forEach(function(message) {\n\t\tvar json = lively.webcollab.parseJson(message);\n\t\tif (reqTextPos === 0 || json.isLoginMessage /*FIXME under heavy load reqTextPos not 0 when login response arrives*/) {\n\t\t\tthis._isLoggedIn = json && json.isSuccess;\n\t\t\tthis.config().onLogin && this.config().onLogin(req);\n\t\t} else {\n\t\t\tthis.config().onReceive && this.config().onReceive(json);\n\t\t}\n\t}, this);\n},"]]>truetrue
1truetruetrue
Browseworld...falsenullfalse
Pushchangesbackfalsenullfalse
Refreshfalsenullfalse
Evalonfalsenullfalse
Sortfalsenullfalse
truetruenullfalsenullnullnullnullfalse
nulltruechatMorph=newBoxMorph(newRectangle(20,100,400,500))chatMorph.openInWorld()//chatMorph.remove()chatMorph.setFill(Color.rgb(220,220,220))loginLabel=newTextMorph(newRectangle(20,20,50,20),'Login:')chatMorph.addMorph(loginLabel)loginLabel.beLabel()loginLabel.setPosition(pt(20,24))//loginLabel.remove()login=newTextMorph(newRectangle(70,20,80,20),'')chatMorph.addMorph(login)login.setExtent(pt(160,20))login.setName('login')//login.remove()loginButton=newButtonMorph(newRectangle(240,20,70,20))chatMorph.addMorph(loginButton)loginButton.setLabel('Login')loginHandler={btnPress:function(val){if(!val)return;varuser=$morph('login').textString;}}connect(loginButton,'value',$morph('login'),clip=newClipMorph(newRectangle(0,0,400,400))clip.applyStyle({borderWidth:1,borderColor:Color.black})clip.openInWorld()clip.ownerclip.remove()truetruefalse32truetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
falsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
Login:falsenull
Loginfalsenullfalse
EinTest2EinTest2EinTestEinTestEinTestEinTestEinTest7
config={user:'robert',listenOnChannels:['testChannel'],onLogin:function(){agent.shouldBeLoggedIn=true$morph('status').updateTextString('Loggedin')},onStreamClose:function(){$morph('status').updateTextString('Loggedout');if(agent.shouldBeLoggedIn)agent.login();},onLogout:function(){agent.shouldBeLoggedIn=false},onReceive:function(json){varm=$morph('chatText')varchatText=json.message.text+'\n'+m.textString;m.updateTextString(chatText)},}agent=newWebCollabAgent(config)agent.login()agent.isLoggedIn()agent.logout()agent.broadcast({channel:'testChannel',text:'EinTest2'})agent2=newWebCollabAgent({user:'robert3'})
nulltruetruetruefalse34truetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
falsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse ' + msg : '');
var testSerialized = Strings.format('new %s(null, "%s")', test.name(), test.currentSelector);
this.testResultDict[id] = {isListItem: true, string: string, value: testSerialized, test: test, isJSONConformant: true}
var list = Object.values(this.testResultDict).select(function(ea) { return ea.isListItem });
var errorOccurred = list.any(function(ea) { return ea.test && ea.test._errorOccured });
this.panel.testInput.setFill(errorOccurred ? Color.red : Color.green);
this.setList(list);
}]]> 400)
throw new Error('Error in login/receive from stream. Message: ' + newText);
// newText can be a list of cr lf separated json messages
// call onLogin/onReceive just with one json obj at a time
var messages = newText.split('\r\n');
messages.pop(); // remove last empty string
messages.forEach(function(message) {
var json = lively.webcollab.parseJson(message);
if (reqTextPos === 0 || json.isLoginMessage /*FIXME under heavy load reqTextPos not 0 when login response arrives*/) {
this._isLoggedIn = json && json.isSuccess;
this.config().onLogin && this.config().onLogin(req);
} else {
this.config().onReceive && this.config().onReceive(json);
}
}, this);
}]]> 400) {
var json = JSON.parse(req.responseText);
throw new Error('Logout not successful ' + json.status);
}
this._isLoggedIn = false;
}]]>= 400)
throw new Error('Failure issuing request. Status: ' + req.status + ' ' + req.responseText);
};
req.open(method, url, !sync);
req.send(content);
return req;
}]]>
null31