ok, thanks! Now it works when I do:
char plugin[MAXPDSTRING];
sprintf(plugin, "%s/else-browser.tcl", else_obj_class->c_externdir->s_name);
pdgui_vmess("load_plugin_script", "s", plugin);
and it loads fine on my old macbook air! Same issue remains though on my newer macbook pro... nothing really changed...
error is a bit different though. It now says
UNHANDLED ERROR: invalid command name ".popup"
while executing
"$mymenu add separator"
(procedure "category_menu::create" line 3)
invoked from within
"category_menu::create .popup"
("uplevel" body line 55)
invoked from within
"uplevel #0 $tclcode"
FAILED TO LOAD /Users/ale/Documents/Pd/externals/else/else-browser.tcl
-----------
In both this way and the previous way I was trying to load the file, the error complains it can't fint the .tcl file, which is funny, because it is there, and also, it is able to find it if I don't use the startup call but just load the binary at some point later instead. Again, this is in mojave, same OS as I'm using in my macbook air, so it can't be the OS... to make things crazier, same macbook pro computer and the new code works in my monterey partition. Nothing really changed and doing it in a more proper way didn't help. It seems the issue is a bit more bizarre and Pd just can't see this file at startup somehow.
any new ideas and hints?
cheers