I am trying to create a named CursorTrack using host.createCursorTrack in JavaScript, but it seems I am not able to figure out how to do it right.
I am using the following code in init():
Code: Select all
mct = host.createCursorTrack("mctid", "mctname", 2, 0, false);
mct.name().addValueObserver(function(value) {
println("mct name is: " + value)
});Code: Select all
mct.selectFirst()
mct.selectNext()Interestingly, when I do the same with a non-named cursor, namely
Code: Select all
uct = host.createCursorTrack(2, 0);
uct.name().addValueObserver(function(value) {
println("CursorTrack name is: " + value)
});Code: Select all
uct.selectFirst()
uct.selectNext()Code: Select all
mct = host.createCursorTrack("mctid", "mctname", 2, 0, true);How I can go about creating a named cursor that actually works? Thanks for any help!
