Cool, that’s what I figured but wanted to be sure! That means once I get that far I’ll try creating some multi-instance widgets to test with first, already have a good one picked out for it
But first, I’m having some difficulties importing a “simple macro” include file, such as the ones I’m using for color/style definitions etc. I didn’t see anything in the examples that helped me and I tried a few random ways with no success, so I have a few questions about that:
I’ve tried:
#include “includes/tg_colors.inc.csd”
#import(“includes/tg_colors.inc.csd”)
import(“includes/tg_colors.inc.csd”)
and having the import on the form declare like so, no luck yet.
form caption("GUI Test") size(380,294), pluginID("tgui"), import("includes/tg_colors.inc.csd"), $ROOT
-
Does a simple macro file need to be structured as xml too with a cabbage section?
-
Does it have any filename (purely naming here, ignoring actual content) requirements that distinguish the import behavior (such as .xml vs .inc vs .csd) that defines or alters how cabbage will treat it?
-
Should this be done as part of the form declaration like a widget import, or as a standalone cabbage section import statement, or is this somehow done differently?
-
Assuming the import is supposed to be done on the form declaration line, would the $ROOT usage in the above example be valid if ROOT had just been defined in the file that was just imported on that same line?
Unrelated to that, does cabbagelite not have anywhere to check the current running version? I ran into issues before I realized this version installed over cabbage1, not cabbage2… so I was puzzled by the wrong version message for a little bit in the full gui version.
Anyways… once I have simple imports working, I’ll start converting some widgets into importable versions to try out and give some feedback there. Very excited to start trying that out!
edit: just FYI, a bunch of things appear to be working as expected in c2, but not in c2lite. the “radiobutton” vs “radiobutton2” define order thing is still an issue. Not a big deal to me, just pointing out since it’s fixed in the full version Same goes for the instrument title not appearing when launched from sublime (aka via command line options/arguments), instead just getting “CabbageLite”. Both of these issues were discussed here, if you need more info: Cabbage2lite pre-testing: 1
It also seems like my plant woes may be specific to c2lite. I found that if I copied your new examples (along with the .xml files) to a new folder and tried to run them from there rather than from the builtin examples dir, it quietly fails to import and I get an empty screen. But if I switch my build system to the full c2, the imports work just fine.
This makes me wonder if the c2lite didn’t get rebuilt before making the package? But without a version #, there’s no way to be sure