-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't return in JogWheelBasic on deck absent in option #13425
base: main
Are you sure you want to change the base?
Don't return in JogWheelBasic on deck absent in option #13425
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you show me some sample code where this late binding is useful/needed?
isPress: Button.prototype.isPress, | ||
inValueScale: function(value) { | ||
// default implementation for converting signed ints | ||
return value < 0x40 ? value : value - (this.max + 1); | ||
}, | ||
inputWheel: function(_channel, _control, value, _status, _group) { | ||
if (!this.hasDeckNumber) { | ||
console.warn("bad deck number; ignoring inputWheel()"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now this should actually return now, imo. same below.
get hasDeckNumber() { | ||
return Number.isInteger(this.deck) && this.deck > 0; | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we haven't used js getters until now. have you made sure this works? I'm not confident the Object merging logic handles getters and setters correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I had to use Object.defineProperties
instead.
ff36f45
to
2356bb8
Compare
The current DN-S3700 controller I use retrieves its deck number from the deck's settings with a sysex message. Maybe there's another way but this is how it works right now. Plus, no other component requires an |
get group() { | ||
return self._deck; | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get group() { | |
return self._deck; | |
}, | |
get group() { | |
return self._group; | |
}, |
Thats a very valid argument. Thanks. |
Component.prototype.connect.call(this); | ||
this.deck = parseInt(script.channelRegEx.exec(this.group)[1]); | ||
} | ||
reset() {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is just there to allow cleaning when the deck has changed (for instance, stop a motorized jog).
So |
e94a366
to
38bbfc7
Compare
38bbfc7
to
7f739ac
Compare
I don't think so. The segfault is definitely weird. Can you collect a backtrace? |
This allows late binding of
JogWheelBasic
usingComponentContainer.reconnectComponents
andDeck.setCurrentDeck
.