Guys and gals,
You've been extremely helpful with the two questions I've asked on this 
forum over the past couple months as I was learning C++ and trying to 
create an add-on.  I have something going that I'm pretty excited about - 
skeleton tracking/gestures with depth cameras and OpenNI 2.0.  It seems to 
be working very well, and I'm pretty happy with it.

There's just one tiny flaw.  I need to put my initialization function that 
kicks it off as the very last line in my Javascript file.  If I put ANY 
Javascript after the init() call, it won't be called.  I was willing to 
live with this, and just call it a quirk, especially since callbacks/timers 
are called perfectly fine.

I WAS willing to live with it, until today when I tried Node Webkit (
https://github.com/rogerwang/node-webkit).  I compiled my add on using the 
"nv-gyp" command in that project, and everything kicks off perfectly. 
 Unfortunately, it looks like it's unable to spin up webkit, and the window 
is locked with a spinning cursor.  I just know that it's because of my 
little quirk.

Early on in my development of this project, I discovered that I couldn't 
leave a while loop running that keeps processing frames of data coming from 
the device.  Some of the basic tutorials say that doing this will just lock 
up the whole node process.  So I did the next logical step of spinning up a 
thread.  This is where I thought things were good enough.  Node doesn't 
lock up anymore, and I can process frames on the thread, make callbacks, 
everything I need.

But....like I said, there's that quirk where I need to call that initialize 
method on line 191 as the very last thing I do because no JS in my main 
project runs if after that.
https://github.com/bengfarrell/nuimotion/blob/master/src/Main.cpp

Does anyone have any clues as to why this is?  I'm happy to rearchitect to 
get rid of this bug, I'm just don't know what's going on under the hood to 
cause this.

As always, thanks very much!

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" 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/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to