Closed tgrey1 closed 4 years ago
Using the very latest build, 2.3.56, I don't see any issues?
Oi, let me freshen up. I think I'm on an Aug.20 build.
I had an Aug.24 build, but for some reason I stepped back... I don't recall why. Maybe https://github.com/rorywalsh/cabbage/issues/83?
Hrm... I grabbed 20200902.2, and this example still appears to break for me in both full and lite.
Ok... this is interesting. It matters on if it's commented out like:
;#define COLOR colour(255,0,0,255)
vs.
; #define COLOR colour(255,0,0,255)
Interesting! I'll take a deeper look tomorrow..
Should be fixed now in git. Note that I only tested this case, so you might want to quickly run through some other macro heavy .csd files just to make sure my commit doesn't break them. Can you close this out if it passes your tests? Thanks.
I grabbed 20200903.3... something is definitely wrong here. It fixed the original problem, but another has crept in.
Multiple macros don't appear to be working, for example: (editing to update the inline comments, they were from the previous example)
<Cabbage>
form caption("Combobox Example") size(400, 300), pluginID("test")
#define COLOR colour(255,0,0,255)
; this second macro doesn't appear to get set
#define ANOTHER colour(0,255,0,255)
combobox $COLOR items("1", "2", "3"), bounds(100, 100, 150, 30)
combobox $ANOTHER bounds(100, 150, 150, 30), items("1", "2", "3")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d
</CsOptions>
<CsInstruments>
; Leave most value default, need something to compile
ksmps = 32
</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f0 z
</CsScore>
</CsoundSynthesizer>
Ha, I was afraid of something like that! I had another go at fixing it. Let me know if it works. Both of your csd run fine.
20200903.4 is looking much better! I ran some of my most macro heavy examples, and everything appears to be working exactly as expected.
I'll close this out and reopen if needed, or open a new one if it seems more appropriate to whatever I find. Thanks for taking a look at this!
It looks like if a widget line uses an undefined macro, the next entry of values on the line gets lost.
In this example, commenting out the color macro loses bounds() for one widget, and items() for the other!
This is how it looks by default:
And then if you comment out the color macro, which should in theory ONLY lose the color settings for the widgets, it looks like this: