I found the solution. I was executing a command which returned a MySQL
result set. However the query is asynchronous, so the data could not be
returned immediately. I found the correct way to do it:
Ape.registerCmd("myFunc", false, function(params, info){
sql.query('SELECT', function(res, errNo){
info.sendResponse('raw', {'result':res});
}.bind(this));
return -1;
});
Hopefully this helps someone in the future, though my initial question
wasn't so clear.
On Mon, Jan 10, 2011 at 6:30 PM, Felix Filozov <[email protected]> wrote:
> You're the one sending a command, so you can wait for as long as you want.
> I'm probably misunderstanding you you.
>
>
> On Sun, Jan 9, 2011 at 1:54 AM, Bael <[email protected]> wrote:
>
>> Is it possible to delay a command until I am ready to send the data. I
>> would like to be able to wait for my SQL query instead of sending out
>> another raw upon its completion.
>>
>> --
>> 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]<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/
>>
>
> --
> 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]<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/
>
--
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/