Tutorial: Build a MIDI synthesiser error "setMidiInput" is undefined

hey could some one assist me im doing the Tutorial: Build a MIDI synthesiser but i keep getting error “setMidiInput” is undefined

i am at this step Listing MIDI inputs

at this point (Then add the following code to the MainContentComponent constructor).