hide patcher/patcherview when opened

Mar 20, 2013 at 7:26pm

hide patcher/patcherview when opened


is there a way to open a patcher with a invisible patcherview(hidden patcher window)?
When opening it with stringload(“xy”) and setting it invisible two line after, like this:

t_object* opened_patch = stringload("xy");
t_object* open_p_topview = jpatcher_get_firstview(opened_patch);
patcherview_set_visible(open_p_topview, 0);

it is shown for a small moment.

I would like to set the position and size first
and make the patcher/patcherview visible just after that.

Is it somehow possible? With intload(“…”) maybe?


Mar 21, 2013 at 3:51pm


It works fine for me (max 5.1.9 / SDK-5.1.7 / os X.4.11), not you ?

void flop_bang(t_flop *x)
t_object *p = NULL;
t_object *v = NULL;     

if ((p = (t_object *)stringload("HabemusPapam.maxpat"))
    && (v = jpatcher_get_firstview(p))) {
    patcherview_set_visible(v, 0);
  1. flop.zip
Mar 22, 2013 at 5:10pm


not really, I can see the window for the glimpse of a second before it dissappears.
I want the window to be hidden when opened, not after.

Mar 22, 2013 at 6:50pm


On my computer i don’t have any window on the screen (and to be honest, that surprised me). I have no idea how to avoid that and i’m pretty sure it is impossible to do by this way ; i’m afraid that you will be forced to implement yourself a “stringload” workaround.

Mar 22, 2013 at 8:07pm


…got this working through forcing another window to stay above the created one during the init.

Mar 23, 2013 at 8:17am


IMHO, i should not rely on the portability of this kind of trick ; can’t you use something like “newobject_fromdictionary” instead ?

Mar 23, 2013 at 1:59pm


you’re right this is not really clean. I can’t use newobject_fromdictionary
because it does not create a top-level patcher. It creates a (sub)patcher into a patcher.
But there’s something like jpatcher_load_fromdictionary. That looks promising. Good idea!

Mar 23, 2013 at 2:34pm


I understand your problem ; and i’m not used with toppatcher creation sufficiently to submit a valuable solution ; please let me know if you find a way with jpatcher_load_fromdictionary or not ;-)

Mar 23, 2013 at 2:52pm


don’t mind, that dict idea was quite good. Of course I’ll post it if I find a solution.

Mar 26, 2013 at 7:59pm

You must be logged in to reply to this topic.