Hi! Thanks a lot, these information were really useful for me, I got it working right now! Don't get angry on me, but I got 2 more questions ;)
1) Object Definitions on server side In the development process it is really helpful to know which object provides which functions and attributes. On client-side I can just look into the Source-JS-Files (for example Pipe.js / MultiPipe.js). But where are the definitions on the server-side? Are there any Javascript- or C-Files I can extract the definitions from? Because obviously the definitions of server- and client-side differ a bit or am I wrong with this? 2) Return a custom raw on a command I want to return a custom raw when a client sends a certain command. The wiki article about server-side JS modules shows, that this can be implemented by returning a custom raw in the registerHookCmd-function. But when I do this, the registerCmd-function is not executed any more, because the registerHookCmd-function obviously is called before that. Returning a custom raw in the registerCmd-function itself has no effect, so I am wondering how to return a custom raw and additionally call the registerCmd-function... Thanks for your help! Dominik On Oct 18, 5:00 pm, Nicolas Trani <[email protected]> wrote: > 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 webhttp://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/ -~----------~----~----~----~------~----~------~--~---
