static void cb_ERPWindow_publication (Editor /* editor */, autoDaata publication) { /* * Keep the gate for error handling. */ try { bool isaSpectralSlice = Thing_isa (publication.get(), classSpectrum) && str32equ (Thing_getName (publication.get()), U"slice"); praat_new (publication.move()); praat_updateSelection (); if (isaSpectralSlice) { int IOBJECT; LOOP { iam (Spectrum); autoSpectrumEditor editor2 = SpectrumEditor_create (ID_AND_FULL_NAME, me); praat_installEditor (editor2.get(), IOBJECT); editor2.releaseToUser(); } } } catch (MelderError) { Melder_flushError (); } }
END static void cb_ERPWindow_publication (Editor editor, void *closure, Data publication) { (void) editor; (void) closure; /* * Keep the gate for error handling. */ try { praat_new (publication, NULL); praat_updateSelection (); if (Thing_member (publication, classSpectrum) && wcsequ (Thing_getName (publication), L"slice")) { int IOBJECT; LOOP { iam (Spectrum); autoSpectrumEditor editor2 = SpectrumEditor_create (ID_AND_FULL_NAME, me); praat_installEditor (editor2.transfer(), IOBJECT); } } } catch (MelderError) { Melder_flushError (NULL); } }