IOhannes m zmoelnig wrote:
Dave S wrote:
Hello all,
So, the question stands: What is the last argument of [cnv] for?
AS IN: #X obj 0 0 cnv 15 768 22 cnv_heading_S cnv_heading_R All_About_Canvases 12 12 0 14 -233017 -1 0;
Does anybody know?
yes, thomas, who is the author of this object should know (tomorrow, when he is in the office i could ask him)
apart from that, the source-code should know....
the arguments for the iemguis (these are the ones where you get the fancy properties dialog) have undergone several generations of change. so it could be, that the last argument is just there for compatibilites sake. (i tried talking thomas into putting an "API-version"-argument into the argument list to make the parsing simpler, but to no avail)
furthermore, parts of the argument-handling are handled by a general "iemgui_args"-function. it might be, that this general approach has some leftovers, e.g. unused arguments.
looking at the c-code of the [cnv] (g_mycanvas.c, g_all_guis.c) it seems, like the latter case is at least "not wrong". the value of the 13th argument is used to turn on a "loadinit"-value (important for [loadbang]-behaviour of e.g. [bng]; should be totally unused in the [cnv]-case) and a "scale"-value (i think this turns on/off the "scale" at the [vu])
anything clear?
Almost. The function my_canvas_save in g_mycanvas.c stores the x_isa field of x_gui as an int. x_isa is a 32-bit struct named t_iem_init_symargs, made up of the following (from g_mycanvas.h):
typedef struct _iem_init_symargs { unsigned int x_loadinit:1; unsigned int x_rcv_arg_tail_len:6; unsigned int x_snd_arg_tail_len:6; unsigned int x_rcv_is_arg_num:6; unsigned int x_snd_is_arg_num:6; unsigned int x_scale:1; unsigned int x_flashed:1; unsigned int x_locked:1; unsigned int x_reverse:1; /* bugfix */ unsigned int dummy:3; } t_iem_init_symargs;
...so x_loadinit is one of 9 elements; are any of them actually used?
Martin