cct.writeString(cct.deparseString(text), si.address);
String towrite = cct.deparseString(text); if (towrite == null) { JOptionPane .showMessageDialog( mainWindow, "Unknown error converting text to EarthBound format.\n" + "This was probably caused by invalid characters between\n" + "sqare brackets [ & ]. Only use:\n" + "0123456789ABCDEFabcdef<space>\n" + "Use of other characters will result in an error.", "Pre-Write Error: Unknown error", JOptionPane.ERROR_MESSAGE); return; } cct.writeString(towrite, si.address);
    private void saveInfo()    {        CCInfo cct = cc[TEXT_CC_TYPE[currentList]]; //current CC Type        boolean comp = useComp.isSelected();        if (comp && cct.getStringLength(ta.getText(), true) == 0)        {            comp = false;        }        String text = comp ? cct.compressString(ta.getText()) : ta.getText();        StrInfo si = (StrInfo) textLists[currentList].get(currentSelection);        if (cct.getStringLength(text, false) > si.str.length()            && isPreventOverwrites())        {            JOptionPane.showMessageDialog(mainWindow,                "The new text is larger than the old text. Shorten the text,\n"                    + "or uncheck the \"Prevent Overwrites\" box.\n"                    + "NOTE: Do not uncheck \"Prevent Overwrites\"\n"                    + "unless you know what you are doing!",                "Pre-Write Error: Text too long", JOptionPane.ERROR_MESSAGE);            return;        }        cct.writeString(cct.deparseString(text), si.address);        loadText(currentList, this);        resetList();        showInfo();    }