Date: Sun, 16 Sep 2012 17:33:11 -0700 (PDT) From: Hugh Anderson To: nowjs@googlegroups.com Message-Id: <48bcfd6a-1e9a-4e15-a854-6ded4e5dbd88@googlegroups.com> In-Reply-To: <9fd0b0ef-9574-4ee6-9e3f-6b9a497bdeed@googlegroups.com> References: <9fd0b0ef-9574-4ee6-9e3f-6b9a497bdeed@googlegroups.com> Subject: Re: syncing array in group.now, it turns into an object MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1360_15695067.1347841991938" ------=_Part_1360_15695067.1347841991938 Content-Type: multipart/alternative; boundary="----=_Part_1361_15609118.1347841991939" ------=_Part_1361_15609118.1347841991939 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit My server nowjs version is 0.7.0. That seems to be the latest available to me, as a Windows user. I installed using the instructions here: http://blog.nowjs.com/running-nowjs-natively-on-windows The file served by my localhost:99/nowjs/now.js reports it is version 0.8.1 in the comments inside it, but it was served by my 0.7.0 nowjs Windows branch clone. Thanks to anybody who can help. Here is a simplified version of the code that demonstrates the problem. var Util = require('util'); function inspectObject (obj) { return Util.inspect(obj, true, 7, true); }; nowjs.on('newgroup', function (group) { console.log('Nowjs group created: ' + group.groupName); group.now.userList = []; console.log('userList=' + inspectObject(group.now.userList)); group.now.userList.push({ memberName: 'test' }); console.log('userList=' + inspectObject(group.now.userList)); }); nowjs.getGroup('testGroup'); ------=_Part_1361_15609118.1347841991939 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
My server nowjs version is 0.7.0.  That seems to be the latest av= ailable to me, as a Windows user.  I installed using the instructions = here:
http://blog.nowjs.com/running-nowjs-natively-on-windows
<= div>The file served by my localhost:99/nowjs/now.js reports it is version 0= .8.1 in the comments inside it, but it was served by my 0.7.0 nowjs Windows= branch clone.

Thanks to anybody who can help.=

Here is a simplified version of the code that= demonstrates the problem.

var Util =3D require('util');
function inspectObject (obj) {
    return Util.inspect(obj, = true, 7, true);
};
nowjs.on('newgroup', = function (group) {
<= span class=3D"Apple-tab-span" style=3D"white-space:pre">=09   &= nbsp;console.log('Nowjs group created: ' + group.groupName);
=09    group.now.userList =3D [];
=09    console.log('us= erList=3D' + inspectObject(group.now.userList));
=09    group.now.userList.push({ memberName: 't= est' });
=09    conso= le.log('userList=3D' + inspectObject(group.now.userList));
=09});
nowjs.getGroup('testGroup');
------=_Part_1361_15609118.1347841991939-- ------=_Part_1360_15695067.1347841991938--