Hi Alexey,

Do you have a public URL where I can check?

Thanks

Anthony C.

Le 20/01/10 17:03, Alexey Ignatyev a écrit :
Ok. I can create channel.

I only need to call client.core.start({'name': 'random_name'}), and
then client.core.join('testchannel'). So the channel will create, but
I still can not receive messages from it, becouse I always get error
004 from APE.

I tried to process this error:

client.onError('004', function(errorRaw){
                $('#apemessages').append('<br/><span style="background-
color:red">Error 004</span>  ' + errorRaw.toString());

                this.core.clearSession();
                this.core.initialize(this.core.options);
});

But in this case APE throws this error again, again and again. I
refreshed page 5 or more times and then it is looks like connected.
Also I receive error in Core/Core.js in function parseResponse:
function(raws, callback): Error JSON.parse.
What is problem?

On 18 янв, 11:45, Alexey Ignatyev<[email protected]>  wrote:
Hi. I am using Javascript.js client for connect to channel. Mootools
core works and check tool works also.  Here are just small code:

Common.RegisterApeClient = function()
{
         var client = new APE.Client();

         client.addEvent('load', function(){
                 $('#apemessages').append('<div>Loaded</div>');
         });

         client.addEvent('ready', function(){
                 $('#apemessages').append('<div>Ready</div>');
         });

         client.onRaw('test', function(data){
                 $('#apemessages').append('<div>New message ' + data.toString() + 
'</
div>');
         });

         client.onCmd('test', function(raw){
                 $('#apemessages').append('<div>New cmd ' + raw.toString() + '</
div>');
         });

         client.onError('test', function(data){
                 $('#apemessages').append('<br/><span style="background-
color:red">New message</span>  ' + data.toString());
         });

         client.load({'identifier': 'demo', channel: 'testchannel',
                 complete: function(ape){
                         $('#apemessages').append('<div>Completed</div>');
                         client.core.join('testchannel');
                         //client.core.start();
                 }
         });

}

It is not works. I try inline push from other code and it is returns
UNKNOWN_CHANNEL. Looks like this code doesn't open new channel. Can
you explain me correct way to open channels or connect to channels in
Javascript client.

Thanks.

-- 
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/

Reply via email to