Lively Kernel canvas
// this script is evaluated on world load
400)
this.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.onLogin(req);
} else {
this.onReceive(json);
}
}, this);
}]]> 400) {
var json = JSON.unserialize(req.responseText);
this.error('Logout not successful ' + json.status);
}
this._isLoggedIn = false;
}]]> 400)
this.error('Error requesting active users');
var json = JSON.unserialize(req.responseText);
this.onGetActiveUsers(json.activeUsers);
}]]>= 400)
this.error('Failure issuing request. Status: ' + req.status + ' ' + req.responseText);
};
req.open(method, url, !sync);
req.send(content);
return req;
}]]>
ProgrammierenimWebmitLivelyKernel18null
savefalsenull
truenull
saveas...falsenullnull
null
10000.011974107452520337Wikicontroltrue
worldsavedtoschatzii.xhtmlin1141ms16null
10000.034336838203247906Wikicontroltrue
Schatziitrue
Loginfalsenullfalsenull
worldsavedtoschatzii.xhtmlin1463ms16null
10000.000029255306069810122Wikicontroltrue
Logoutfalsenullfalsenull
Sendfalsenullfalsenull
nulltrueagent=newWebChatClient()[objectObject]agent.useragent.user=$morph('login').textStringagent.useragent.logout()if(!agent.isLoggedIn()){agent.login()}agent.broadcast({text:$morph('send').textString,channel:'bwinf'})14truetruefalsetruetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
falsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
worldsavedtoschatzii.xhtmlin1628ms16null
worldsavedtoschatzii.xhtmlin1573ms16null
worldsavedtoschatzii.xhtmlin1555ms16null
worldsavedtoschatzii.xhtmlin1576ms16null
worldsavedtoschatzii.xhtmlin1578ms16null
worldsavedtoschatzii.xhtmlin1574ms16null
10006.810969363864566Wikicontroltrue
nullfalsetruenullfalse
lively.webcollab.WebChatClient:onReceivefalsenullfalse
false
false
falsenullfalse
localrequirementsfalsetruefalse0false
initializerfalsetruefalse0false
lively.webcollab.WebChatClientfalsetruefalse0false
webcollabextensionsfalsetruefalse0false3102nullnulltruenulltruetrue
1true
null
null
null
nulltruetrue
isLoggedInfalsetruefalse0false
userfalsetruefalse0false
channelfalsetruefalse0false
initializefalsetruefalse0false
isLoggedInfalsetruefalse0false
setUserfalsetruefalse0false
setChannelfalsetruefalse0false
onLoginfalsetruefalse0false
onLogoutfalsetruefalse0false
onStreamClosefalsetruefalse0false
onReceivefalsetruefalse0false
onSentDonefalsetruefalse0false
onGetActiveUsersfalsetruefalse0false
errorfalsetruefalse0false
loginfalsetruefalse0false
logoutfalsetruefalse0false
broadcastfalsetruefalse0false
getActiveUsersfalsetruefalse0false
resetfalsetruefalse0false
setupTestStreamfalsetruefalse0false
getDocumentfalsetruefalse0false
deleteDocumentfalsetruefalse0false
privateOnLoginAndReceivefalsetruefalse0false
privateOnStreamClosefalsetruefalse0false
privateOnLogoutfalsetruefalse0false
privateOnGetActiveUsersfalsetruefalse0false
testStreamCloseCbfalsetruefalse0false
performActionfalsetruefalse0false
makeRequestfalsetruefalse0false31010nullnulltruetruetrue
1true
null
null
null
nulltruetrue
onReceive:function(json){$morph('messages').updateTextString(json.user+':'+json.message.text)}1truetrue2000000truetrue
1truetruetrue
Browseworld...falsenullfalse
Pushchangesbackfalsenullfalse
Refreshfalsenullfalse
Evalonfalsenullfalse
Sortfalsenullfalse
truetruenullfalsenullnullnullnullfalse
worldsavedtoschatzii.xhtmlin1637ms16nullnull50