diff --git a/source/include/FluidMaxWrapper.hpp b/source/include/FluidMaxWrapper.hpp index 100cc79b..c99a30c7 100644 --- a/source/include/FluidMaxWrapper.hpp +++ b/source/include/FluidMaxWrapper.hpp @@ -2068,7 +2068,7 @@ class FluidMaxWrapper template static void deferLoad(FluidMaxWrapper* x, t_symbol*, long ac, t_atom* av) { - defer(x, (method) doLoad, nullptr, static_cast(ac), av); + defer_low(x, (method) doLoad, nullptr, static_cast(ac), av); } template @@ -2120,7 +2120,7 @@ class FluidMaxWrapper template static void deferDump(FluidMaxWrapper* x, t_symbol*, long ac, t_atom* av) { - defer(x, (method) doDump, nullptr, static_cast(ac), av); + defer_low(x, (method) doDump, nullptr, static_cast(ac), av); } template @@ -2207,7 +2207,7 @@ class FluidMaxWrapper template static void deferPrint(FluidMaxWrapper* x, t_symbol*, long, t_atom*) { - defer(x, (method) doPrint, nullptr, 0, nullptr); + defer_low(x, (method) doPrint, nullptr, 0, nullptr); } template @@ -2225,7 +2225,8 @@ class FluidMaxWrapper template static void deferRead(FluidMaxWrapper* x, t_symbol* s) { - defer(x, (method) &doRead, s, 0, nullptr); + // defer_low because we have a dialog box situation + defer_low(x, (method) &doRead, s, 0, nullptr); } template @@ -2245,9 +2246,12 @@ class FluidMaxWrapper char fullpath[MAX_PATH_CHARS]; if (s == gensym("")) - { - if (open_dialog(filename, &path, &outtype, &filetype, 1)) + { + short openResult = open_dialog(filename, &path, &outtype, &filetype, 1); + if (openResult != 0) + { return; // non-zero -> cancel + } } else { @@ -2272,7 +2276,8 @@ class FluidMaxWrapper template static void deferWrite(FluidMaxWrapper* x, t_symbol* s) { - defer(x, (method) &doWrite, s, 0, nullptr); + // defer_low because we have a dialog box situation + defer_low(x, (method) &doWrite, s, 0, nullptr); } template