Hi Pablo, I think I have it working now,
thanks for your patience, I end up sending the raw to the channel and then just let the user know of a new user joined.. thanks appreciate it On May 1, 6:26 pm, Pablo <[email protected]> wrote: > I don't know what to tell you, is just not the normal behavior i have > experienced. > > > > > > > > On Tuesday, May 1, 2012 8:03:18 PM UTC-4, UTAN wrote: > > > Pablo, > > > I think should go to a different path, send a raw using "afterJoin" > > event in server side I have > > > tested with console at the client side, only receive the user that > > just logged in and I don't get all users connected when I login and or > > when I refresh.. > > > But I don't know how to send the user OBJECT and pipe OBJECT, do you > > know how to send it in a raw from server side?.. > > > check the code which send empty user and pipe object: > > > Ape.addEvent('afterJoin',function(user, channel) > > { > > channel.pipe.sendRaw('joining',{ > > 'user' :user, > > 'channel':channel.pipe > > }); > > }); > > > See my point? > > > On May 1, 12:09 pm, Pablo Tejada <[email protected]> wrote: > > > Yeah, try that and see what you get... > > > > Sent from my iPhone > > > > On May 1, 2012, at 3:04 PM, UTAN <[email protected]> wrote: > > > > > So I need to have the pipe defined and then add an event to it, so I > > > > can have user joining to the channel.. > > > > > so something along this lines? > > > > > initialize: function(){ > > > > > this.currentPipe = null; > > > > > this.addEvent('multiPipeCreate', funtion(pipe){ > > > > this.createDefaultPipe(pipe); > > > > > }); > > > > > this.currentPipe.addEvent("userJoin", function(user, pipe){ > > > > this.userWelcome(user, pipe); > > > > }); > > > > > }, > > > > > So what you think, I am not at home so I cant test. > > > > > On May 1, 11:41 am, Pablo Tejada <[email protected]> wrote: > > > >> That is the problem, i think you have to add this particular event to > > > >> pipe/channel not the client to have the effect you want it to have. > > > >> Ex: > > > > >> channelPipe.addEvent("userJoin", funtion(){...}); > > > > >> Where channelPipe is the channel/multipipe object reference > > > > >> Sent from my iPhone > > > > >> On May 1, 2012, at 2:32 PM, UTAN <[email protected]> wrote: > > > > >>> It reference the client.. > > > > >>> On May 1, 11:29 am, Pablo Tejada <[email protected]> wrote: > > > >>>> What does 'this' references? the client? client.core? a > > pipe/channel? > > > > >>>> Sent from my iPhone > > > > >>>> On May 1, 2012, at 2:15 PM, UTAN <[email protected]> wrote: > > > > >>>>> this.addEvent('userJoin', function(user ,pipe){ > > > > >>>>> console.log( user.length); > > > >>>>> // what I want > > > >>>>> if(user.length == 1) this.userWelcome(user, pipe); > > > > >>>>> // there isnt a way to detect that? > > > >>>>> // so this function is called as many time there are user > > connected.. > > > >>>>> this.userWelcome(user, pipe); > > > > >>>>> }); > > > > >>>>> hope the idea is cleared.. > > > > >>>>> On May 1, 10:45 am, Pablo Tejada <[email protected]> wrote: > > > >>>>>> I still dont get it, code? > > > > >>>>>> Sent from my iPhone > > > > >>>>>> On May 1, 2012, at 1:37 PM, UTAN <[email protected]> > > wrote: > > > > >>>>>>> Pablo, > > > > >>>>>>> Thanks, now should I send the raw from afterjoin event or same > > join > > > >>>>>>> event in server side, wouldn't that be the same as waiting the > > join > > > >>>>>>> event in Client side, if refresh or login for the first time I > > will > > > >>>>>>> receive all the raws as the users logged in...? > > > > >>>>>>> Thought the same way but I was hopping someone to know how to > > check > > > >>>>>>> when the join event has a list of users and not only one... > > > > >>>>>>> will check it out. > > > > >>>>>>> On May 1, 8:43 am, Pablo Tejada <[email protected]> wrote: > > > >>>>>>>> Here is a pointer, you receive all users in a channel raw. Try > > this > > > > >>>>>>>> client.onRaw("channel", function(raw, pipe){ > > > >>>>>>>> console.log(raw.data.users) > > > >>>>>>>> //OR, not sure > > > >>>>>>>> console.log(raw.data.pipe.users) > > > > >>>>>>>> } > > > > >>>>>>>> Sent from my iPhone > > > > >>>>>>>> On Apr 30, 2012, at 7:25 PM, UTAN <[email protected]> > > wrote: > > > > >>>>>>>>> Hi, > > > > >>>>>>>>> So I have my application working fine, but I have a bit of > > trouble > > > >>>>>>>>> with the userjoin event , I am using Ape session when I login > > Ape > > > >>>>>>>>> server send the users connected with usejoin event, that to > > build the > > > >>>>>>>>> user list.. > > > > >>>>>>>>> Now what happen is that use that event to pass a user join > > text to all > > > >>>>>>>>> connected users, but when I login I get the messages as the > > amount of > > > >>>>>>>>> user in the chat, > > > > >>>>>>>>> how can I determine when I am receiving not only one user > > object but > > > >>>>>>>>> all the user connected?... > > > > >>>>>>>>> I've somehow eliminated to tell myself that I logged in like > > this > > > > >>>>>>>>> this.core.user.properties.name != user.properties.name > > > > >>>>>>>>> If I check the user.length its undefined because I am checking > > an > > > >>>>>>>>> object.. > > > > >>>>>>>>> if I had the length propertie I could just test > > > > >>>>>>>>> if(user.length == 1) joinedUser(); > > > > >>>>>>>>> That way I know is only user that is joining and not all of > > them > > > >>>>>>>>> because I refreshed the page or I joined the chat.. and I am > > getting > > > >>>>>>>>> all user at once.. > > > > >>>>>>>>> Hope you understand what I mean. > > > > >>>>>>>>> -- > > > >>>>>>>>> You received this message because you are subscribed to the > > Google > > > >>>>>>>>> Groups "APE Project" group. > > > >>>>>>>>> To post to this group, send email to > > [email protected] > > > >>>>>>>>> To unsubscribe from this group, send email to > > > >>>>>>>>> [email protected] > > > >>>>>>>>> For more options, visit this group at > > > >>>>>>>>>http://groups.google.com/group/ape-project?hl=en > > > >>>>>>>>> --- > > > >>>>>>>>> APE Project (Ajax Push Engine) > > > >>>>>>>>> Official website :http://www.ape-project.org/ > > > >>>>>>>>> Git Hub :http://github.com/APE-Project/ > > > > >>>>>>> -- > > > >>>>>>> You received this message because you are subscribed to the > > Google > > > >>>>>>> Groups "APE Project" group. > > > >>>>>>> To post to this group, send email to > > [email protected] > > > >>>>>>> To unsubscribe from this group, send email to > > > >>>>>>> [email protected] > > > >>>>>>> For more options, visit this group at > > > >>>>>>>http://groups.google.com/group/ape-project?hl=en > > > >>>>>>> --- > > > >>>>>>> APE Project (Ajax Push Engine) > > > >>>>>>> Official website :http://www.ape-project.org/ > > > >>>>>>> Git Hub :http://github.com/APE-Project/ > > > > >>>>> -- > > > >>>>> You received this message because you are subscribed to the Google > > > >>>>> Groups "APE Project" group. > > > >>>>> To post to this group, send email to [email protected] > > > >>>>> To unsubscribe from this group, send email to > > > >>>>> [email protected] > > > >>>>> For more options, visit this group at > > > >>>>>http://groups.google.com/group/ape-project?hl=en > > > >>>>> --- > > > >>>>> APE Project (Ajax Push Engine) > > > >>>>> Official website :http://www.ape-project.org/ > > > >>>>> Git Hub :http://github.com/APE-Project/ > > > > >>> -- > > > >>> You received this message because you are subscribed to the Google > > > >>> Groups "APE Project" group. > > > >>> To post to this group, send email to [email protected] > > > >>> To unsubscribe from this group, send email to > > > >>> [email protected] > > > >>> For more options, visit this group at > > > >>>http://groups.google.com/group/ape-project?hl=en > > > >>> --- > > > >>> APE Project (Ajax Push Engine) > > > >>> Official website :http://www.ape-project.org/ > > > >>> Git Hub :http://github.com/APE-Project/ > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "APE Project" group. > > > > To post to this group, send email to [email protected] > > > > To unsubscribe from this group, send email to > > > > [email protected] > > > > For more options, visit this group at > > > >http://groups.google.com/group/ape-project?hl=en > > > > --- > > > > APE Project (Ajax Push Engine) > > > > Official website :http://www.ape-project.org/ > > > > Git Hub :http://github.com/APE-Project/ -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/ape-project?hl=en --- APE Project (Ajax Push Engine) Official website : http://www.ape-project.org/ Git Hub : http://github.com/APE-Project/
