Cabbage Logo
Back to Cabbage Site

Multiple widget generation

Im trying to create #define funtions to optimise my slider code bc its a lot, but using the sidepanel in the widget edit mode results in a line of code like this:
gentable gentable gentable bounds(28, 32, 300, 149) tablenumber(1.0) outlinethickness(3) identchannel("osc1table") gentable gentable gentable gentable gentable gentable gentable bounds(28, 32, 300, 149) gentable gentable gentable gentable bounds(28, 32, 300, 149) tablebackgroundcolour(15, 15, 15, 0) tablecolour:0(53, 255, 0, 255) tablecolour:0(53, 153, 0, 255) tablecolour:0(53, 153, 219, 255) amprange(-1.1, 1.1, -1, 0.0100) gentable gentable bounds(28, 32, 300, 149) tablecolour:0(53, 153, 219, 255) tablecolour:0(53, 153, 219, 255)
i have no idea whats causing this. Of course i can alway delete the extra code, but i would much rather cabbage be able to function like its supposed to. Ive only ran into this bug in the past few hours so it might be something i have done? im not sure. Im using windows 10 1903 with a core i3 7130U with 8gb of ddr4 ram using cabbage version 2.3.0 heres the csd file if you wanna poke around and see if it does the same for you Hept-X.csd (14.1 KB)

I think macros that affect the widget’s creation technically work, but aren’t really supported if you’re using the GUI editor. Rory isn’t a big fan of them, as they make the parsing a bit of a headache.

I use them extensively too, without any problems, however I manually place and resize all of my widgets, and use an external editor (sublime)… so I’m probably a bit of an odd use-case.

Using the macros and the GUI editor is a little bit hit and miss, as you’ve seen. I will try to update that soon!