Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote callback not being called #16

Closed
scottburch opened this issue Mar 19, 2011 · 4 comments
Closed

remote callback not being called #16

scottburch opened this issue Mar 19, 2011 · 4 comments

Comments

@scottburch
Copy link

SERVER

everyone.now.getData = function(callback) {
callback(getData())
}

CLIENT

now.ready(function() {
    now.getData(function(data) {
        fillTree(treePanel.getRootNode(), data);
    })
})

I took a wireshark trace and I see the instructions to call the callback (I think) but the callback never gets called. The documentation does not cover this well.

@dvv
Copy link

dvv commented Mar 19, 2011

Please, carefully look at the example -- you need to add a second callback at client-side.
Just use a noop -- function(){}

@ericz
Copy link
Contributor

ericz commented Mar 19, 2011

Hi scottburch.

If you are running NowJS version < 0.3, then dvv is correct and you will need to use an noop.

However if you are using the latest npm version (0.3.0), I have tested your code and it works for me. Can you provide more information about the exact code and version of NowJS you're using?

Thanks, Eric

@scottburch
Copy link
Author

I wrote a minimal example of what I am doing (since I put this in a larger project) and it does work fine. I will try to remove a piece at a time until I figure out what is causing it to fail. I will post here when I find it. Thanks.

I was not sure I was using it correctly.

@scottburch
Copy link
Author

Ok, found it.
I am using ExtJS and loading ext-base.js causes it to fail. Works if I remove it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants