Hi,
the move demo have an error with multiPipeCreate (i didn't finish to
port the demo to 1.0).
multiPipeCreate works like that :
this.addEvent('multiPipeCreate', function(pipe, options){
});
I wrote some tutorial for the client side on the wiki :
http://www.ape-project.org/wiki/index.php/Category:Tutorial
(some tutorials are not yet fully finished and might contains a lot of
english mistake)
Regards.
Dominik wrote:
> Hi!
>
>
>> For your first question I think you misunderstood. This article is
>> about "Server-Side javascript", not client side :)
>> APE 1.0 support Javascript module for the server. (Look at your ./
>> APE_Server/scripts/ directory).
>>
>
> Yes, sorry, I meant the APE Log told me that Ape.pipe() ist not a
> function, not the Browser ;)
> I tried new Ape.pipe(), but this also does not give me a valid pipe
> (for example:
> var mypipe = new Ape.pipe();
> --> mypipe.pubid is undefined and mypipe.send is not a function...).
>
> I really don't know what's going wrong there :/
>
> I also do not really understand the "multiPipeCreated"-Event on the
> client side.
> The Move-Demo for example defines:
>
> this.addEvent('multiPipeCreate', function(type, pipe, options){
> if(type=='multi') this.pipe = pipe;
> });
>
> I tried this in my application and it does not work, because type
> never has the value "multi", but is a huge array full of weird
> information.
> The pipe-parameter furthermore does not give me a pipe-object, but is
> an array with information about the userpipes and the channel-pipe.
>
> For example:
> this.addEvent('multiPipeCreate', function(type, pipe, options){
> jQuery("#debug").append("<br>Pipe created");
> alert(pipe.toSource());
> if(type=='multi')
> {
> jQuery("#debug").append("<br>Pipe found");
> this.pipe = pipe;
> }
> });
>
> The alert shows:
>
> ({users:[{casttype:"uni", pubid:"8f30f9d3b67f2c59ae72d0e174e68467",
> properties:{mypipe:"[object pipe]", name:"dominik"}, level:1}], pipe:
> {casttype:"multi", pubid:"41eeb70009b15b1bd81a93e41bcf5fbf",
> properties:{name:"apetest"}}})
>
>
> I'm really confused about this pipe-thing ;)
>
>
>
>> You can avoid this by loading "Sessions.js". With this, every tabs/
>> window you open connect the same user with the same message queue
>> (everything is synchronized).
>>
>
> Works great, thanks!
>
>
>
>
>>> But when
>>> I close one tab, he needs some time to realize that the user has left
>>> (so just realizes it when the open connection of this tab times out).
>>> Is there a way to immediately tell the server that a user has left
>>> when I close a tab/window?
>>>
>> Indeed, some browser don't have a good deal with "onunload" event. So,
>> APE Server can't know when a user left. (You can tune the timeout in ./
>> src/main.h)
>>
>
> Ok, thanks for the info!
>
> Thanks for the help so far!
> Dominik
> >
>
--
Nicolas Trani - Développeur web
Weelya - Improve the web
http://www.weelya.com
--~--~---------~--~----~------------~-------~--~----~
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/
-~----------~----~----~----~------~----~------~--~---