Hi,

I just checked you code, and see that something is wrong. When you are
sending the CHECK command you also changed the frequency (the number
before the subdomain). You have to use 0 and not 1. Frequency only
increment when you have for example too tab open in your browser or when
you refresh the page.

Cheers.
Snouser wrote:
> DOM-ements and iframes are being used my the javascript.
> The APE-core is relaying on the fact that you are using an webbrowser
> (iframes and DOM-elements), whitch in this case you dont.
> So that is not an option, sorry.
>
> On Mar 27, 2:21 pm, Nicolas Trani <[email protected]> wrote:
>   
>> Hi,
>>
>> did you try to use APE JSF? This shouldn't be an issue as the APE JSF
>> Client is only pure javascript and it load the APE JSF Core inside an
>> iframe so this shouldn't be an issue for Titanium javascript framwork.
>>
>> Regards.
>>
>>
>>
>> Snouser wrote:
>>     
>>> I'm using the Titanium javascript framework for the iPhone,
>>> http://www.appcelerator.com/,
>>> and after their 0.8 version is does not work to include external web
>>> libs like jQuery and mootools.
>>> That is why I need to write my own ape-client.
>>>       
>>> Any ideas why I'm getting the wrong data from the server?
>>>       
>>> On Mar 25, 2:37 am, John Chavarria <[email protected]> wrote:
>>>       
>>>> I'm sorry if my question appears silly, but why are you not using the APE
>>>> JavaScript Framework that will do everything for you about this client side
>>>> matters ?
>>>>         
>>>> Regards,
>>>>         
>>>> --
>>>> John Chavarria - CEO / Designer
>>>> Weelya - improve the Web
>>>>         
>>>> +33 (0) 4.67.169.778
>>>> +33 (0) 6.43.56.00.83
>>>>         
>>>> Twitter : @jchavarria / @weelya
>>>>         
>>>> 32 Rue du Faubourg Boutonnet
>>>> 34090 Montpellier
>>>>         
>>>> http://www.ape-project.org/http://www.weelya.com/
>>>>         
>>>> On Thu, Mar 25, 2010 at 1:47 AM, Snouser <[email protected]> wrote:
>>>>         
>>>>> I'm trying to use the APE protocol without using moo-tools-core.
>>>>>           
>>>>> Here is what I've done so far.
>>>>>           
>>>>> var a = Titanium.Network.createHTTPClient();
>>>>> a.open('POST','http://0.ape.domain.com:6969/0/?');
>>>>> a.send('[{"cmd":"CONNECT","chl":1},{"cmd":"JOIN","chl":2,"params":
>>>>> {"channels":"testchannel"}}]');
>>>>> a.onload = function()
>>>>> {
>>>>>        Ti.API.info('DAT!');
>>>>>           
>>>>>        var apa = eval('(' + this.responseText + ')');
>>>>>        Ti.API.info(apa[0].data.sessid);
>>>>>           
>>>>>        var x = Titanium.Network.createHTTPClient();
>>>>>        x.open('POST','http://1.ape.domain.com:6969/0/?');
>>>>>        x.send('[{"cmd":"CHECK","chl":3,"sessid":"' + apa[0].data.sessid +
>>>>> '"}]');
>>>>>        x.onload = function()
>>>>>        {
>>>>>                Ti.API.info(this.responseText);
>>>>>        }
>>>>> }
>>>>>           
>>>>> The problem is that the "wrong" data is being returned.
>>>>> If I compare it with my browser that connects to the exact same
>>>>> server.
>>>>>           
>>>>> Here is the data being return using the code above.
>>>>>           
>>>>> [INFO] [{"time":"1269476986","raw":"IDENT","data":{"user":
>>>>> {"casttype":"uni","pubid":"894a09e1633e45891cbd178108ef34d2"}}},
>>>>> {"time":"1269476986","raw":"CHANNEL","data":{"users":
>>>>> [{"casttype":"uni","pubid":"894a09e1633e45891cbd178108ef34d2","level":
>>>>> 1},
>>>>> {"casttype":"uni","pubid":"522a8772c41ba459cd446a94956e7f52","level":
>>>>> 1},
>>>>> {"casttype":"uni","pubid":"17b9d9e3389b7584eeb1668f68e0e586","level":
>>>>> 1},
>>>>> {"casttype":"uni","pubid":"0a65bddcdebf55cd6b91d90ce441a831","level":
>>>>> 1},
>>>>> {"casttype":"uni","pubid":"23c92a70cb37dc157bdc35443074630e","level":
>>>>> 1}],"pipe":
>>>>>           
>>>>> {"casttype":"multi","pubid":"c37fda4a214f3b12d6c426e757a245f7","properties":
>>>>> {"name":"testchannel"}}}}]
>>>>>           
>>>>> Here is the data being returned using moo-tools-core.
>>>>> The same data is begin posted from the browser.
>>>>>           
>>>>> [{"time":"1269477725","raw":"postmsg","data":{"message":"Some data"}}]
>>>>>           
>>>>> Why isn't it returning the data I want?
>>>>>           
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "APE Project" group.> To post to this group, send email 
>>>>> [email protected]
>>>>> To unsubscribe from this group, send email 
>>>>> to>[email protected]<ape-project%[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/
>>>>>           
>>>>> To unsubscribe from this group, send email to ape-project+
>>>>> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
>>>>> ME" as the subject.
>>>>>           
>> --
>> Nicolas Trani - Web engineer
>> Weelya - Improve the web
>> 32 rue du faubourg boutonnet
>> 34090 Montpellier
>> Tel: 04 67 169 778 - Fax: 09 57 91 99 
>> 91http://www.weelya.comhttp://www.ape-project.org
>>     
>
>   


-- 
Nicolas Trani - Web engineer
Weelya - Improve the web
32 rue du faubourg boutonnet
34090 Montpellier
Tel: 04 67 169 778 - Fax: 09 57 91 99 91
http://www.weelya.com
http://www.ape-project.org

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

To unsubscribe from this group, send email to 
ape-project+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to