Deprecated LOM method in max.ts
See original GitHub issueHello @walmik,
I believe there is a deprecated method in max.ts file. Anytime I load a device that uses scribble.max method in Live 11, it throws this message:
I think that the 'remove_notes'
method in max.ts should be changed to 'remove_notes_extended'
, since the LOM documentation sais the following:
“Deprecated since Live 11.0. Please use remove_notes_extended instead. If a device uses the deprecated method in Live 11, a warning pop-up will notify users that the device needs to be updated.”
Simply replacing the method is not backwards compatible with Live 10, so I wrote the following 2 lines:
const live = new LiveAPI('live_app');
live.call('get_major_version') === 10 ? liveObject.call('remove_notes', 0, 1, 258, 127) : liveObject.call('remove_notes_extended', 1, 127, 0, 258);
I would have opened a PR, but I have very little experience writing TS, so Im posting it here. I have tested the solution manually with js object in Max and ES15 syntax. Im posting the ES15 code for posterity:
var live = new LiveAPI('live_app');;
if (live.call('get_major_version') === 10) {
liveObject.call('remove_notes', 0, 1, 258, 127);
} else {
liveObject.call('remove_notes_extended', 1, 127, 0, 258);
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
wow this is a great find, thank you for noting it here… i havent moved to 11. i ll get this in soon(ish) i have begun some refactoring and documentation work. I ll pick this up.
Thank you @JanZaion I think this is the right way forward. I ll take a look at the PR in scribbleformax and will continue this discussion there.