fixes for err in callback; terminate om end

This commit is contained in:
Andrey Sidorov 2012-04-11 15:58:50 +10:00
parent cc5f53ae45
commit 779da87017

View file

@ -1,13 +1,11 @@
var x11 = require('../lib/x11');
var xclient = x11.createClient();
xclient.on('connect', function(display) {
var X = this;
x11.createClient(function(display) {
var X = display.client;
var hello = 'Hello, node.js';
X.InternAtom(false, hello, function(atomId) {
X.GetAtomName(atomId, function(str) {
X.InternAtom(false, hello, function(err, atomId) {
X.GetAtomName(atomId, function(err, str) {
console.log('Value for atom ' + atomId + ' is \"' + str + '\"');
X.terminate();
});
});
});