last day (15 days later) » 

7:24 PM
0
A: How to get an async data in a function with Meteor

Kuba WyrobekUse Future library : heroku = Meteor.require("heroku"); Meteor.methods({ getHeroku: function(message) { // Set up a future var fut = new Future(); client = new heroku.Heroku({key: "xxxxxx"}); client.get_app(app, function (error, result) { // Does...

 
Thank you Kuba, but I have already tried that. Maybe I'm doing wrong because it gives me this error: cl.ly/image/0A2M2x143k0C Full server side code: pastebin.com/RKQH0tzF
 
I changed fut.ret to fut.return. That should work.
 
Same error :( TypeError: Object #<Future> has no method 'return' and TypeError: Object #<Future> has no method 'wait' I think it's because it is deprecated (github.com/meteor/meteor/issues/1311#issuecomment-22686373) but I can't find alternative
 
Do this : fut["return"](results)
 
Nope, the same problem :( Trace pastebin.com/VrzGQAjw
 
7:24 PM
try: return fut["wait"]()
 
Same :( Trace: pastebin.com/n5HZAVFG // Updated final code pastebin.com/iQnfMwue
 
Hi skozz
Check this:
 
yeah better here
 
also this:
it looks like meteor evolved and my working code stopped to work ;/
 
Yeah, it seems
thank you, I need a few minutes before test this approach
i'll notify you soon
I'm not quite sure how to use (I'm continuing trying)
 
7:41 PM
It is really interesting issue
as before my code worked and also in May people were using it
:
 
yeah, It's very rare :(
 
Now I have some time. Give me few minutes and I will try to confir if that code works or not.
 
Ok, thank you man :_D
 
8:09 PM
it works :D
 
party yeah!
how? xDDDD
 
I have updated my answer
0
A: How to get an async data in a function with Meteor

Kuba WyrobekSolution working in Meteor 0.8.2: if (Meteor.isClient) { Template.herokuDashboard.helpers({ appInfo: function() { return Session.get("herokuDashboard_appInfo"); } }); Template.herokuDashboard.created = function(){ Meteor.call('getData', function (e...

I provided general solution
you just need to replace
setTimeout with heroku API
 
let's try!
Npm.require instead Meteor.require?
 
yeah
well this worked for me, let me check if Meteor.require works as well
 
ok, 1 sec
(testing)
 
8:19 PM
I have pushed that code to gihub
just for convenience
 
YEAH!
 
I'm glad :)
 
wow man thank you very much
I've been working all day with this
I was going crazy XDDDD
 
sometimes it is like this
on my blog kubawyrobek.com
i try to put some little tricks with meteor and other stuff
could be useful for you
good luck
 
:O! looks nice!
thank you!
 

last day (15 days later) »