Hi I'm trying to figure out a way to handle the multible keyboards I spoke about. So far I have something like the attached file (linux users can run the load script to load in corect order). But I really need some feedback on the following two things: 1) In sine.ck: listen() never recieves any messages. What am I doing wrong? Is my definition of the InstrMsg class screwed? 2) I would like to spork a member objects function (in zone.ck) but I get a [chuck](VM): NullPointerException: shred[id=5:spork~exp:(2)], PC=[137269484] if I try to. Isn't that possible or am I getting something wrong? Both questions are uncommented in the code. I really hope someone will help me a bit further. Thanks in advance. -- peace, love & harmony Atte http://www.atte.dk
Hi Atte!
1) In sine.ck: listen() never recieves any messages. What am I doing wrong? Is my definition of the InstrMsg class screwed?
I think the problem was that the event that broadcast in Zone.listen() is not the same one that InstrSine.listen() is waiting on. I have attached a slightly revised version which seems to work here. Most of the changes is in Zone. For clarity, I also capitalized the class names and prepend some member variables with 'm_'.
2) I would like to spork a member objects function (in zone.ck) but I get a [chuck](VM): NullPointerException: shred[id=5:spork~exp:(2)], PC=[137269484] if I try to. Isn't that possible or am I getting something wrong?
I think this is a bug in chuck: sporking a member function from inside another function. Sorry about that! The work around is to spork a non-member function and pass it the appropriate data. We plan to have it fixed soon. Hope this helps! Best, Ge!
participants (2)
-
Atte André Jensen
-
Ge Wang