Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion [nowjs-remove group]

Received: by 10.52.24.167 with SMTP id v7mr1606196vdf.2.1334329047788;
        Fri, 13 Apr 2012 07:57:27 -0700 (PDT)
X-BeenThere: nowjs@googlegroups.com
Received: by 10.52.173.225 with SMTP id bn1ls1587575vdc.6.gmail; Fri, 13 Apr
 2012 07:57:27 -0700 (PDT)
Received: by 10.52.32.66 with SMTP id g2mr1598259vdi.5.1334329046981;
        Fri, 13 Apr 2012 07:57:26 -0700 (PDT)
Received: by 10.52.32.66 with SMTP id g2mr1598258vdi.5.1334329046966;
        Fri, 13 Apr 2012 07:57:26 -0700 (PDT)
Return-Path: <i...@ianserlin.com>
Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53])
        by gmr-mx.google.com with ESMTPS id cz20si4186378vdb.0.2012.04.13.07.57.26
        (version=TLSv1/SSLv3 cipher=OTHER);
        Fri, 13 Apr 2012 07:57:26 -0700 (PDT)
Received-SPF: neutral (google.com: 209.85.212.53 is neither permitted nor denied by best guess record for domain of i...@ianserlin.com) client-ip=209.85.212.53;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.212.53 is neither permitted nor denied by best guess record for domain of i...@ianserlin.com) smtp.mail=...@ianserlin.com
Received: by mail-vb0-f53.google.com with SMTP id fc26so2585369vbb.40
        for <nowjs@googlegroups.com>; Fri, 13 Apr 2012 07:57:26 -0700 (PDT)
        d=google.com; s=20120113;
        h=mime-version:x-originating-ip:in-reply-to:references:from:date
         :message-id:subject:to:content-type:x-gm-message-state;
        bh=R0mXBeaQaf+iuVsqQn6+njksnGVBzDgjedHZxhV2wNk=;
        b=k8vtI5ye6Vt3xedC8+A2YSQiveDiINgpXKZhDMqXH65zrQAn2asexZbLYZnC1Yrd2m
         RjptLBQXbkg4mjysWyG4a8eZEn9f9HBUenlCL9iDG4pefkBt86RvgXneCQLqnoz0Yc2C
         ZFToL8h6DGmMIT3WFhTr3LjTaznHs/ozX+i+/JGGIgKIRx86zDjvT6K8Da7I4opESeJa
         a36qyAhkK25SVDMwMHmGL+YoysuhrOJjCKX9tb5OLf+mio5z+roFIpmtVnrOwNKsS9a5
         o51ZgaTWWoBnjRV8m4rS0yW9j4bTXKw0xBaQByuTPxc+HaKK3+TeU05cyoNB5AQ5rcUf
         up9Q==
Received: by 10.220.64.137 with SMTP id e9mr956211vci.9.1334329046584; Fri, 13
 Apr 2012 07:57:26 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.90.38 with HTTP; Fri, 13 Apr 2012 07:57:05 -0700 (PDT)
X-Originating-IP: [67.174.197.19]
In-Reply-To: <CABjoLuVdq9gtzd0Fd0KO1=fs9UD5SK8kZaFjfFrUbAQZLDv...@mail.gmail.com>
References: <CABjoLuVdq9gtzd0Fd0KO1=fs9UD5SK8kZaFjfFrUbAQZLDv...@mail.gmail.com>
From: Ian Serlin <i...@ianserlin.com>
Date: Fri, 13 Apr 2012 07:57:05 -0700
Message-ID: <CALWN_toAqxXLibqUg2ExhoV5UZHO9RHS8WH1+Uuf3XvAToP...@mail.gmail.com>
Subject: Re: [NowJS] [nowjs-remove group]
To: nowjs@googlegroups.com
Content-Type: multipart/alternative; boundary=000e0cdf989ed5cd5504bd90b034
X-Gm-Message-State: ALoCoQn4i8iDm8ZvCVuz2cc3AEaFEC+0lCvOcWra+dw+51zsqADtpPZ0GSSeN+gfojYtAsc1vS98

--000e0cdf989ed5cd5504bd90b034
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi H=C6=B0ng,

Try something like:

myGroup.on('leave', function(){
    myGroup.count(function(numberOfUsers){
        if( numberOfUsers =3D=3D 0 ){ nowjs.removeGroup( 'myGroup' ); }
    });
});


Ian Serlin

i...@ianserlin.com
http://useful.io
http://www.linkedin.com/in/ianserlin
213-399-1688
@spiceninja




On Thu, Apr 12, 2012 at 9:07 PM, H=C6=B0ng L=C3=AA <lshun...@gmail.com> wro=
te:
>
> Hi All,
> I have a qs: How to remove group when all client of this group has
removed? (syntax)
> Thanks and sorry cause my english verry bad :(
>
> --
>
> L=C3=AA S=C4=A9 H=C6=B0ng
>

--000e0cdf989ed5cd5504bd90b034
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi=C2=A0H=C6=B0ng,<br><br>Try something like:<br><br>myGroup.on(&#39;leave&=
#39;, function(){<br>=C2=A0 =C2=A0 myGroup.count(function(numberOfUsers){<b=
r>=C2=A0 =C2=A0 =C2=A0 =C2=A0 if( numberOfUsers =3D=3D 0 ){ nowjs.removeGro=
up( &#39;myGroup&#39; ); }<br>=C2=A0 =C2=A0 });<br>

});<br><br><br>Ian Serlin<br><br><a href=3D"mailto:i...@ianserlin.com">ian@i=
anserlin.com</a><br><a href=3D"http://useful.io">http://useful.io</a><br><a=
 href=3D"http://www.linkedin.com/in/ianserlin">http://www.linkedin.com/in/i=
anserlin</a><br>

213-399-1688<br>@spiceninja<br><br><br><br><br>On Thu, Apr 12, 2012 at 9:07=
 PM, H=C6=B0ng L=C3=AA &lt;<a href=3D"mailto:lshun...@gmail.com">lshung87@g=
mail.com</a>&gt; wrote:<br>&gt;<br>&gt; Hi All,<br>&gt; I have a qs: How to=
 remove group when all client of this group has removed? (syntax)<br>

&gt; Thanks and sorry cause my english verry bad :(<br>&gt;<br>&gt; --<br>&=
gt;<br>&gt; L=C3=AA S=C4=A9 H=C6=B0ng<br>&gt;<br>

--000e0cdf989ed5cd5504bd90b034--