In the latest beta builds of cabbage there is an issue where comboboxes default to having no value. This cannot be fixed by setting the value manually with the value identifier. The issue does not exist in the Cabbage 2.7 release, but was introduced in a beta release.
The csd I am using is using legacy channel methods of communication between csound and the GUI, but I would not think that would create this issue.
I just tested the combobox example in the Widgets folder and it works as expected? Here is it. Iām setting the value to 2, but even without that it loads the default choice.
ComboTest.csd (2.1 KB)
The example is working on my end as well. I am unsure why things broke on my plugins. I have included a plugin I have been working on.
spectralDelay.csd (82.7 KB)
Actually, I think it has to do with using the old gui mode- I turned it off on the example and encountered the same issue.
Yes, I see that now. That shouldnāt be the case of course. Iāll take a look when I get a moment. 
Hi @Chris_Poovey. Iāve pushed a āfixā now and triggered a new build in Azure. To be honest though, Iām not sure my āfixā wonāt break another part of that system. Can you test it and let me know?
1 Like
It seems to work based on some cursory testing. Selections are taking and presets seem to work as expected!
Iād say proceed with caution! If anything looks off let me know 
Having an issue here where if I use cabbageSet on the combobox (in this case populated by a directory) it comes back blank each time even after manually setting a value.
combobox bounds(217, 50, 200, 20), populate("*.wav", "includes/IRs"), channel("IR"), value(2), automatable(0)
kverbtype, kverbchanged cabbageGetValue "ReverbType"
if kverbtype == 1 then
cabbageSet kverbchanged, "IR", sprintf("bounds(%i,30,400,16)", 3000)
else
cabbageSet kverbchanged, "IR", sprintf("bounds(%i, 50, 140, 20)", 217)
endif
Cabbage Pro 2.8.103
Does setting the channelType() to string help?
I forgot about that but it doesnāt seem to help
combobox bounds(3000, 50, 200, 20), channelType("string"), populate("*.wav", "includes/IRs"), channel("IR"), value(2), automatable(0)
Leave it with me. Iāll take a look when I get a chance. 
Thanks Rory,
Overall Iām having trouble figuring out what the directory comboboxās value is and how to address it. Is it a full path or just the file name? If the latter, it is without an extension? As you know, printing the strings is kind of a headache after init. I know thereās been a few issues with the comboboxes and these params have changed. It would be great to see a help example just illustrating how to use the directory combobox with cabbage opcodes - if there isnāt already.
1 Like
For instance Iām trying to get a full file path to load an audio file into a table for convolution. The combobox (i think) only returns the file name and extension, so I need to append the path before I do anything else.
Simpulse=chnget:S("IR")
SimpulsePath strcat "includes/IRs/", Simpulse
but the strcat and strcatk always seem to run a single cycle before the concatenation returning only the first string - as if the āIRā channel hasnāt loaded yet? Not sure but that is what it seems like. Sorry I know this veering off-topic a bit but I think it might be related?
If I print the SimpulsePath at k-rate
Simpulse =chnget:S("IR")
SimpulsePath strcatk "includes/IRs/", Simpulse
iImpLen filelen SimpulsePath
iImpLenInSamples = iImpLen*gisr*2
printks SimpulsePath, 0.5
I get
includes/IRs
includes/IRs/St Georges Med
as it seems to go a cycle before the combobox value is availableā¦
A few mins laterā¦
OK, I think Iāve narrowed it down to the combobox not having a value on init despite the string being displayed in it. So I think it is only available at k-rate?
a few few mins later part 2ā¦
I managed to get around this by checking for the string length in the combobox - if itās greater than zero. That way it only calls the opcode that references it at k rate - after the string is loaded.
So the only remaining issue is that the combobox resets to empty after a cabbageSet operation on it.
Here what I can manage to string together about comboboxes that list a bunch of files:
- When selected they return only the file name and extension, i.e, no path
- To update an item in said combobox you need to set the text as it will appear in the combobox
- this is a little annoying I have to say - but it can be worked around.
Iāve attached a full example that will work as I think you would expect. Hereās a run down of the best bits 
SFileType cabbageGet "combo1", "fileType" ; get file type as set by populate()
SPath cabbageGet "combo1", "currentDir" ; get the directory that is passed to poplate()
SCsdPath cabbageGet "CSD_PATH" ; get .csd directory
SFilesDir sprintf "%s/%s/", SCsdPath, SPath ; construct full path from absolute and relative paths
SFile, kComboChanged cabbageGetValue "combo1" ; get file name
SFileName cabbageGetFileNoExtension sprintfk("%s/%s", SFilesDir, SFile) ;get filename from full name
The code above constructs paths from the relative ones given to populate() and the absolute path that CSD_PATH returns. Changing to a different folder wonāt break this, as long as you keep things relative. Iām also removing the file extension from the combobox return string. I add it later, itās safer to do this.
if kSliderTrig == 1 then
;update combo and set current file
cabbageSetValue "combo1", sprintfk("%02d", kSlider), kSliderTrig
chnset sprintfk("%s%02d%s", SFilesDir, kSlider, strsubk(SFileType, 1, -1)), "currentFile"
endif
Here I set the combobox item to match the slider value, and then update the new ācurrentFileā channel.
Itās a bit of a hoop, but it works 
comboTest.zip (76.4 KB)
1 Like
Thanks for the detailed example! Iāll dive in tomorrow and see what I can do
Thanks Rory - I havenāt fully dug in yet and my apologies if this thread has become convoluted. Just looking over your example here - does this address the issue with cabbageSet on the combobox resetting to a blank value? I have the other issues resolved but this it the only one outstanding. Just want to make sure before I go down this path! Hereās the issue Iām having⦠https://recordit.co/EIOmGJxkqY
for instance, this line affecting the combobox causes it to go blank
cabbageSet ktrig, "ComboBox", sprintfk("active(%i)", 1)
as does a string affecting the comboBox bounds.
cabbageSet ktrig, "ComboBox", sprintfk("bounds(%i, 20, 100, 20)", 100)
No blank items in my example.
OK, just wondered b/c I didnāt see cabbageSet in there - only cabbageSetValue. Iāll dig in now, thanks
Ah, youāre right, I donāt have cabbageSet. But think the same issue would be resolved with the cabbageSet if you only set the item to what should appear in the combobox. Anyhow, take a look and let me know. 