This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20381 - MIDIInput and MIDIOutput should inherit from MIDIPort, which should not be an interface
Summary: MIDIInput and MIDIOutput should inherit from MIDIPort, which should not be an...
Status: CLOSED FIXED
Alias: None
Product: AudioWG
Classification: Unclassified
Component: MIDI API (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: TBD
Assignee: Chris Wilson
QA Contact: public-audio
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-13 19:20 UTC by Chris Wilson
Modified: 2013-01-18 15:51 UTC (History)
0 users

See Also:


Attachments

Description Chris Wilson 2012-12-13 19:20:54 UTC
From Marcos:

It would be better if you could fold everything into MIDIPort and get rid of MIDIOutput and MIDIInput? you already have the port type, and you can just say that sending() does nothing when a port is not outputting.

If you don't agree, then I think MIDIInput and MIDIOutput need to inherit from MIDIPort (not implement the interface). Implementing the interface makes a huge mess when actually implementing, as the stuff from MIDIPort has to be copied over from MIDIPort.

So, worst case, please change the spec to match the following pattern:

interface MIDIOutput : MIDIPort {
}
interface MIDIInput : MIDIPort {
}
MIDIPort : EventTarget{
}

However, I strongly urge you to do away with MIDIInput and MIDIOutput. They are redundant, IMHO.
Comment 1 Chris Wilson 2012-12-13 19:21:37 UTC
I'll restructure.  They are not redundant, though - Input and Output ports are very different, and not interchangeable.
Comment 2 Chris Wilson 2012-12-13 21:16:31 UTC
Forgot this bit of feedback to roll together: 

The following is also incorrect:
    [TreatNonCallableAsNull] attribute callback? onmessage;

Please change it to:
 attribute EventHandler onmessage;

Fixed all these issues: https://dvcs.w3.org/hg/audio/rev/477c4b064f31
Comment 3 Olivier Thereaux 2013-01-18 15:51:02 UTC
Batch-closing RESOLVED MIDI issues. Reminder: midi issues now tracked at https://github.com/WebAudio/web-midi-api/issues