I have not seem the code of "chat demo"; however what you can do is to
merge both functions into only one. Personally is what I should do.
I am not sure but I guess mootools (supposing you are using it) should
call both functions linked to the same event twice, but don't believe me.
On 01/07/2012 04:48 PM, AndyW wrote:
> You are missing my question. The code has
>
>
> ...
> this.addEvent('uniPipeCreate', this.setPipeName);
> this.addEvent('uniPipeCreate', this.createPipe);
> ...
>
> Is that correct, typo, bug? Or will both setPipeName and createPipe of
> the class get called?
>
>
>
> On Jan 7, 10:38 am, Erick Romero <[email protected]> wrote:
>> If you want to send a command to all users you MUST use the PIPE-CHANNEL.
>> How do you catch the pipe channel? Using multicreatepipe event
>>
>> seudo - code in the *CLIENT-SIDE*
>>
>> client = new APE.Client();
>> ..... initialization, load event, ready event, etc. ....
>>
>> catch the pipe_id on to multiPipeCreate event
>>
>> var pipe_id;
>> client.addEvent('multiPipeCreate', onMultiPipeCreate);
>> function onMultiPipeCreate (pipe, options) {
>> pipe_id = pipe.getPubid();
>> };
>>
>> 1. To send a "chat" message to all users on the channel you do the
>> following.var pipe = client.core.getPipe(pipe_id);
>>
>> if (pipe) {
>> pipe.send("speech_text_to_chat");
>> }
>>
>> The client side should handle the incoming text i.e.
>> client.onRaw('data',
>> function(raw){alert(unescape(decodeURI(raw.data.msg)))});
>>
>> 2. To send a custom command to all users on the channel you do the following
>>
>> var pipe = client.core.getPipe(pipe_id);
>> if (pipe) {
>> pipe.request.send('custom_command_name', {param1: 'a', param2:
>> 'b', param2: 'c'});
>> }
>>
>> of course the server-side must handle the "custom_command_name" command
>> and do something there
>>
>> On 01/06/2012 07:28 PM, utan wrote:
>>
>>
>>
>>
>>
>>
>>
>>> I havent checked at all, but there seem to be some bug floating like
>>> some objects undefined or not available at all.. I am currently
>>> struggling as to how send a manually fired command by user and to
>>> receive it on all the user in the pipe..
>>> regards.
>>> --
>>> 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/