Hello,
I'm trying to create 1 to 1 messaging and I'm hitting a brick wall.
The wiki is not helping me figure out what I need so if someone can
help out that would be great.
I have written a class to work with Mootools, generally it works but I
cannot get 1 to 1 messaging to work, I cannot get the PUBID of any
user and if I do certain things in the wiki, I get JS errors. It's
driving me mad.
To start things off I have this in the dom of my page.
var notifications = new APE.notifications({
container: $('notifications')
});
notifications.addEvent('multiPipeCreate', function(pipe, options) {
//3) Send the message on the pipe
pipe.send('Hello world!');
console.log('Sending Hello world');
});
notifications.load({
identifier: 'notifications',
channel: 'notificationsChannel'
});
Before I even get started with this... I get Uncaught TypeError:
Property '$family' of object [object Object],[object Object] is not a
function. Why is this? Even using the example here does the same
thing http://www.ape-project.org/wiki/index.php/Tutorial:Hello_world.
If I take out the multiPipeCreate function it works fine but don't I
need that to start a chat between 2 users? Tearing my hair out with
this... anyway on to my class, perhaps someone can tell me how to
initiate a chat between 2 users.
I initiate my class using the code above but without the
multiPipeCreate as this breaks everything.
APE.notifications = new Class({
Implements: [APE.Client, Options],
options: {
container: null,
},
initialize: function(options){
this.setOptions(options);
this.els = {};
this.onRaw('postmsg', this.onMsg);
this.addEvent('load',this.connector);
this.createChat();
},
connector: function(core){
if (this.core.options.restore) {
this.core.start({'name': $time().toString()});
console.log('Your client is now re-connected');
} else {
this.core.start({'name': $time().toString()});
console.log('Your client is now connected');
}
},
createChat: function(){
//this is where I will create the private chat form
}
});
Can someone tell me how and where I can figure out each user so I can
then create the connection to send the message between 2 people? I
have tried so many things and it's driving me nuts.
--
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/