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

is it possible to return an deferred from function called by window.$deferRun ? #5

Open
lgersman opened this issue Apr 6, 2011 · 1 comment

Comments

@lgersman
Copy link

lgersman commented Apr 6, 2011

an example :

i have library file containing

window.$deferRun(
function( $, options) {
      function A_processed() { 
          // ...
      }
      function B_processed() { 
          // ...
      }
           // here is the important point(!) : 
           // returning an deferred has no effect right now
      return $.when( A_processed(), b_processed());
},
{
        depends : [ 'ampere_core', 'ampere_util', 'ampere_module', 'ampere_action', 'ampere_history', 'ampere_state', 'ampere_transition', 'ampere_view', 'ampere_theme']
});

i want my library to be resolved

  • when its dependences are resolved (works fine)
  • its function was executed (works fine)
  • the returned deferred are resolved (does not work right now)

i did not find a way to return a deferred from my library function which is taken into account for its "resolved" state.
any idea how to do this ?

kind regards,

lars

@BorisMoore
Copy link
Owner

Interesting question. I hope to look into this scenario at some point, but not in the immediate future...

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

No branches or pull requests

2 participants