"You requested a "+((Driver)PatchEdit.getDriver(deviceNum,driverNum)).getDriverName()+"patch!"+ "\nBut you got a "+((Driver)PatchEdit.getDriver(PatchEdit.Clipboard.deviceNum,PatchEdit.Clipboard.driverNum)).getDriverName()+"patch.",
"You requested a "+PatchEdit.getDriver(deviceNum,driverNum).getDriverName()+"patch!"+ "\nBut you got a "+PatchEdit.Clipboard.getDriver().getDriverName()+"patch.",
  protected void pasteIntoSelectedFrame() {// ErrorMsg.reportStatus("SysexGetDialog->pasteIntoSelectedFrame: " + sysexSize);    if (sysexSize < 20)      return;    byte[] patchSysex;       if (sysex[0]==-16) //F0    {  patchSysex= new byte[sysexSize];       System.arraycopy(sysex, 0, patchSysex, 0, sysexSize);    } else     {     int i=0;      while ((sysex[i]!=-16) && (i<sysexSize)) i++;      if (i==sysexSize) return;      patchSysex= new byte[sysexSize-i];      System.arraycopy(sysex, i, patchSysex, 0, sysexSize-i);     }    Patch p = new Patch(patchSysex, deviceNum, driverNum );    Patch[] patarray = p.dissect();    for (int k = 0; k < patarray.length; k++) {      PatchEdit.Clipboard = patarray[k];      StringBuffer patchString = PatchEdit.Clipboard.getPatchHeader();      // Maybe you don't get the expected patch!      // Check all devices/drivers again!      if ( !(((Driver)PatchEdit.getDriver(PatchEdit.Clipboard.deviceNum,PatchEdit.Clipboard.driverNum)).supportsPatch(patchString,PatchEdit.Clipboard)) )      {	boolean firstRun=true;	boolean foundDriver=false;	// first check the requested device	testforDriver:	for ( int i =PatchEdit.Clipboard.deviceNum;i<PatchEdit.appConfig.deviceCount (); i++)        {          device=(Device)PatchEdit.appConfig.getDevice(i);          for (int j=0;j<device.driverList.size();j++)          {            if ( ((Driver)device.driverList.get(j)).supportsPatch(patchString,PatchEdit.Clipboard) )            {	      PatchEdit.Clipboard.deviceNum=i;	      PatchEdit.Clipboard.driverNum=j;	      PatchEdit.getDriver(i,j).trimSysex(PatchEdit.Clipboard);	      foundDriver=true;              break testforDriver;            }          }	  if (firstRun)	  {	    i=0;	    firstRun=false;	  }	}        if (foundDriver)	{	  JOptionPane.showMessageDialog (null,		"You requested a "+((Driver)PatchEdit.getDriver(deviceNum,driverNum)).getDriverName()+"patch!"+		"\nBut you got a "+((Driver)PatchEdit.getDriver(PatchEdit.Clipboard.deviceNum,PatchEdit.Clipboard.driverNum)).getDriverName()+"patch.",		"Warning", JOptionPane.WARNING_MESSAGE);	}	else	{	  PatchEdit.Clipboard.deviceNum=0;	//reset	  PatchEdit.Clipboard.driverNum=0;	//reset	  PatchEdit.Clipboard.comment=new StringBuffer("Probably a "+LookupManufacturer.get(PatchEdit.Clipboard.sysex[1],PatchEdit.Clipboard.sysex[2],PatchEdit.Clipboard.sysex[3])+" Patch, Size: "+PatchEdit.Clipboard.sysex.length);	  JOptionPane.showMessageDialog (null,		"You requested a "+((Driver)PatchEdit.getDriver(deviceNum,driverNum)).getDriverName()+"patch!"+		"\nBut you got a not supported patch!\n"+PatchEdit.Clipboard.comment,		"Warning", JOptionPane.WARNING_MESSAGE);	}      }      try {        ((PatchBasket)PatchEdit.desktop.getSelectedFrame()).PastePatch();      } catch (Exception ex) {        JOptionPane.showMessageDialog (null, "Library to Receive into must be the focused Window.","Error", JOptionPane.ERROR_MESSAGE);      }    }  }