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

Fixing callbacks in preload() #994

Merged
merged 2 commits into from
Oct 10, 2015
Merged

Conversation

Jared-Sprague
Copy link
Contributor

@lmccart thank you for refactoring the _getDecrementPreload function to use .apply() instead of passing this, much more elegant! In order to work though each call has to use .apply() and all arguments. Using .call() and just parameters in the function declaration, cuts out decrementPreload() if a success callback is passed in, which was the same original problem with success callbacks in preload(). Using .apply(this, arguments) fixes this problem.

I also added a test.json file for the example, because the weather rest service that is used in various examples now requires an API key to use.

Thanks!

@lmccart
Copy link
Member

lmccart commented Oct 10, 2015

ah oops, now I see why it said arguments in there. thank you for the patch!

lmccart pushed a commit that referenced this pull request Oct 10, 2015
Fixing callbacks in preload()
@lmccart lmccart merged commit 0073073 into processing:master Oct 10, 2015
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

Successfully merging this pull request may close these issues.

2 participants