Hi, Folks. I have this script (below) in a TextMorph. When I evaluate each line it seems to work fine, until the last line which causes this error "Type Error: Cannot call method 'startSteppingFor' of null". How do I debug this?
BoxMorph.subclass("LauncherMorph", { addMorph: function(morph) { //super(morph);
morph.velocity=pt(10,0); morph.angularVelocity=Math.PI/16; morph.moveOriginBy(morph.innerBounds().center());
//morph.stepByVelocities(); morph.startStepping(1000,"stepByVelocities");
} }); morph1 = new LauncherMorph(new Rectangle(50,100,80,360)); morph1.openInWorld(); morph2 = Morph.makeRectangle(new Rectangle(20,20,40,40));
morph1.addMorph(morph2); Here's a link to my test page: http://www.lively-kernel.org/repository/lively-wiki/users/pshouse/test.xhtml
Thanks, Patrick
|
Hi, Patrick -
I don't have time to actually debug this, and others may be able
to help you. But, assuming you got morph.stepByVelocities to
work once, I think the problem is that it's required for a morph to be
in a world before you can use stepping. Normally you would do
this by calling super at the beginning, but I don't think your
commented version of that will work. Try instead...
BoxMorph.subclass("LauncherMorph", {
});
The rule is: if you wish to call an overridden method, then add
the pseudo-argument '$super' at the beginning of the declared
arguments. Thereafter you can use $super to refer to the
overridden procedure.
If the problem is what I think it is, this should help.
Good luck
-------------------------------
Hi, Folks. I have this script (below) in a TextMorph. When I evaluate each line it seems to work fine, until the last line which causes this error "Type Error: Cannot call method 'startSteppingFor' of null". How do I debug this? BoxMorph.subclass("LauncherMorph", {
}); morph1 = new LauncherMorph(new Rectangle(50,100,80,360)); morph1.openInWorld(); morph2 = Morph.makeRectangle(new Rectangle(20,20,40,40)); morph1.addMorph(morph2); Here's a link to my test page: http://www.lively-kernel.org/repository/lively-wiki/users/pshouse/test.xhtml Thanks, Patrick
|
In reply to this post by Patrick Shouse
Thanks, Dan! That works great now.
On Mon, Jul 12, 2010 at 1:42 AM, Dan Ingalls <[hidden email]> wrote:
|
In reply to this post by Dan Ingalls-4
Folks -
Well it's only the beginning, but I thought I would share it anyway... If you load the following page into a recent FireFox... http://lively-kernel.org/repository/webwerkstatt/users/Dan/Toy.xhtml ...and follow the instructions, you may be able to play the piano keyboard using rudimentary real-time synthesis. Lots is missing, and several things don't work, but it's a plateau from which to have much fun I think. - Dan _______________________________________________ lively-kernel mailing list [hidden email] http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel |
Hi Dan -
I tried it with the most recent Firefox (9.0.1) and it did not work :-(: ReferenceError: XAudioServer is not defined This is also what happens in Chromium (17.0.964.0) - but what I expected there. - Marko On Jan 23, 2012, at 7:22 AM, Daniel Ingalls wrote: > Folks - > > Well it's only the beginning, but I thought I would share it anyway... > > If you load the following page into a recent FireFox... > > http://lively-kernel.org/repository/webwerkstatt/users/Dan/Toy.xhtml > > ...and follow the instructions, you may be able to play the piano keyboard using rudimentary real-time synthesis. > Lots is missing, and several things don't work, but it's a plateau from which to have much fun I think. > > - Dan > _______________________________________________ > lively-kernel mailing list > [hidden email] > http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel _______________________________________________ lively-kernel mailing list [hidden email] http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel smime.p7s (6K) Download Attachment |
Should work now.
On Jan 23, 2012, at 10:31 AM, Roeder, Marko wrote: > Hi Dan - > > I tried it with the most recent Firefox (9.0.1) and it did not work :-(: > > ReferenceError: XAudioServer is not defined > > This is also what happens in Chromium (17.0.964.0) - but what I expected there. > > - Marko > > > On Jan 23, 2012, at 7:22 AM, Daniel Ingalls wrote: > >> Folks - >> >> Well it's only the beginning, but I thought I would share it anyway... >> >> If you load the following page into a recent FireFox... >> >> http://lively-kernel.org/repository/webwerkstatt/users/Dan/Toy.xhtml >> >> ...and follow the instructions, you may be able to play the piano keyboard using rudimentary real-time synthesis. >> Lots is missing, and several things don't work, but it's a plateau from which to have much fun I think. >> >> - Dan >> _______________________________________________ >> lively-kernel mailing list >> [hidden email] >> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel > > <smime.p7s>_______________________________________________ > lively-kernel mailing list > [hidden email] > http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel _______________________________________________ lively-kernel mailing list [hidden email] http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel |
On Mon, Jan 23, 2012 at 3:48 AM, Robert Krahn
<[hidden email]> wrote: > Should work now. In FF 9.0.1 on Linux I get, after ctrl-d on the section above the dashed line "Browser does not support real time audio output" (etc) (my sound in this browser generally works) - Should i try windows? > > On Jan 23, 2012, at 10:31 AM, Roeder, Marko wrote: > >> Hi Dan - >> >> I tried it with the most recent Firefox (9.0.1) and it did not work :-(: >> >> ReferenceError: XAudioServer is not defined >> >> This is also what happens in Chromium (17.0.964.0) - but what I expected there. >> >> - Marko >> >> >> On Jan 23, 2012, at 7:22 AM, Daniel Ingalls wrote: >> >>> Folks - >>> >>> Well it's only the beginning, but I thought I would share it anyway... >>> >>> If you load the following page into a recent FireFox... >>> >>> http://lively-kernel.org/repository/webwerkstatt/users/Dan/Toy.xhtml >>> >>> ...and follow the instructions, you may be able to play the piano keyboard using rudimentary real-time synthesis. >>> Lots is missing, and several things don't work, but it's a plateau from which to have much fun I think. >>> >>> - Dan >>> _______________________________________________ >>> lively-kernel mailing list >>> [hidden email] >>> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel >> >> <smime.p7s>_______________________________________________ >> lively-kernel mailing list >> [hidden email] >> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel > > _______________________________________________ > lively-kernel mailing list > [hidden email] > http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel lively-kernel mailing list [hidden email] http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel |
Hi Milan -
Yes, I would say try Windows for now. I had the same problem in my Safari, but I've had it work in Chrome, even in Windows emulation! Hopefully soo I'll get things sorted out with the buffer refresh, and especially with browser compatibility. The full file set in the XAudio release supports not only Mozilla and Google, but even has a fallback to Flash that should have worked for you or for my Safari failure. - Dan On Jan 23, 2012, at 3:06 PM, Milan Zimmermann wrote: > On Mon, Jan 23, 2012 at 3:48 AM, Robert Krahn > <[hidden email]> wrote: >> Should work now. > > In FF 9.0.1 on Linux I get, after ctrl-d on the section above the > dashed line "Browser does not support real time audio output" (etc) > (my sound in this browser generally works) - Should i try windows? > >> >> On Jan 23, 2012, at 10:31 AM, Roeder, Marko wrote: >> >>> Hi Dan - >>> >>> I tried it with the most recent Firefox (9.0.1) and it did not work :-(: >>> >>> ReferenceError: XAudioServer is not defined >>> >>> This is also what happens in Chromium (17.0.964.0) - but what I expected there. >>> >>> - Marko >>> >>> >>> On Jan 23, 2012, at 7:22 AM, Daniel Ingalls wrote: >>> >>>> Folks - >>>> >>>> Well it's only the beginning, but I thought I would share it anyway... >>>> >>>> If you load the following page into a recent FireFox... >>>> >>>> http://lively-kernel.org/repository/webwerkstatt/users/Dan/Toy.xhtml >>>> >>>> ...and follow the instructions, you may be able to play the piano keyboard using rudimentary real-time synthesis. >>>> Lots is missing, and several things don't work, but it's a plateau from which to have much fun I think. >>>> >>>> - Dan >>>> _______________________________________________ >>>> lively-kernel mailing list >>>> [hidden email] >>>> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel >>> >>> <smime.p7s>_______________________________________________ >>> lively-kernel mailing list >>> [hidden email] >>> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel >> >> _______________________________________________ >> lively-kernel mailing list >> [hidden email] >> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel > _______________________________________________ > lively-kernel mailing list > [hidden email] > http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel _______________________________________________ lively-kernel mailing list [hidden email] http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel |
Hi Dan,
Thanks - on Windows it works both in FF 9.0.1 and in Chrome 17. Cool - nice Squeaky sounds :) Milan On Mon, Jan 23, 2012 at 5:26 PM, Daniel Ingalls <[hidden email]> wrote: > Hi Milan - > > Yes, I would say try Windows for now. > > I had the same problem in my Safari, but I've had it work in Chrome, even in Windows emulation! > > Hopefully soo I'll get things sorted out with the buffer refresh, and especially with browser compatibility. > The full file set in the XAudio release supports not only Mozilla and Google, but even has a fallback > to Flash that should have worked for you or for my Safari failure. > > - Dan > > On Jan 23, 2012, at 3:06 PM, Milan Zimmermann wrote: > >> On Mon, Jan 23, 2012 at 3:48 AM, Robert Krahn >> <[hidden email]> wrote: >>> Should work now. >> >> In FF 9.0.1 on Linux I get, after ctrl-d on the section above the >> dashed line "Browser does not support real time audio output" (etc) >> (my sound in this browser generally works) - Should i try windows? >> >>> >>> On Jan 23, 2012, at 10:31 AM, Roeder, Marko wrote: >>> >>>> Hi Dan - >>>> >>>> I tried it with the most recent Firefox (9.0.1) and it did not work :-(: >>>> >>>> ReferenceError: XAudioServer is not defined >>>> >>>> This is also what happens in Chromium (17.0.964.0) - but what I expected there. >>>> >>>> - Marko >>>> >>>> >>>> On Jan 23, 2012, at 7:22 AM, Daniel Ingalls wrote: >>>> >>>>> Folks - >>>>> >>>>> Well it's only the beginning, but I thought I would share it anyway... >>>>> >>>>> If you load the following page into a recent FireFox... >>>>> >>>>> http://lively-kernel.org/repository/webwerkstatt/users/Dan/Toy.xhtml >>>>> >>>>> ...and follow the instructions, you may be able to play the piano keyboard using rudimentary real-time synthesis. >>>>> Lots is missing, and several things don't work, but it's a plateau from which to have much fun I think. >>>>> >>>>> - Dan >>>>> _______________________________________________ >>>>> lively-kernel mailing list >>>>> [hidden email] >>>>> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel >>>> >>>> <smime.p7s>_______________________________________________ >>>> lively-kernel mailing list >>>> [hidden email] >>>> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel >>> >>> _______________________________________________ >>> lively-kernel mailing list >>> [hidden email] >>> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel >> _______________________________________________ >> lively-kernel mailing list >> [hidden email] >> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel > lively-kernel mailing list [hidden email] http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel |
Free forum by Nabble | Edit this page |