Cabbage Logo
Back to Cabbage Site

Cabbage 2 group box editing :maybe bug

Hello Rory,
When editing a patch containing groupbox, and the nested items, the “{” disappears. Should the user move the groupbox, all items end up being aligned to main window… Deleting the beautiful patiently organised GUI :-).
Also once an interface has been modified in cabbage 2, opening it in cabbage 1 messes up everything.

Hope this helps,

Can you post an example of the first thing that you mention?

Regarding Cabbage 1 vs 2, it is possible to write things so that they are compatible with both versions. I am currently doing it with all my examples. The main things are that plants no longer need the identifier plant("…") in order to be parsed as a plant (this might be what is causing your GUI to disappear off the screen).
The other thing is that the textbox(1) identifier with rsliders etc. is now valuetextbox(1). Just include both and the GUI results should be the same on both versions.

Hello,

Better than one example, i include screenshots.
The seps are the following :

Create a button


Create a groupbox

Nest the button within the groupbox between “{ " and " }”

Save all

Edit the whole set (CTRL +E) -> Already the opening “{” has disappeared

Move the groupbox and save the patch.

I sincerely hope this will help.

I tend to code GUI by typing myself but when I did try this I did get the same results. I think as Cabbage is rewriting the groupbox line of code based on changes made in the GUI editor, it is losing the ‘{’. The solution is simply to put the ‘{’ on the next line and then it will be left alone:

groupbox bounds(48, 32, 180, 122) 
{ 
button bounds(40, 34, 80, 40) channel("buttonchan") text("Push me", "Push me") 
}

Yes, agreed, this is also what I do… but this is killing the interface GUI once opening it with cabbage 1. I whish I could be more helpful than only reporting bugs

In order for the plant to work the same in Cabbage 1 you need to include the plant("…") identifier:

groupbox bounds(214, 168, 180, 122), plant("plant")
{ 
button bounds(40, 34, 80, 40) channel("buttonchan") text("Push me", "Push me") 
} 

Cabbage 2 has done away with the need for this. Unfortunately if you consequently move the plant around using the GUI editor, the plant() identifier will disappear for the same reason that the ‘{’ disappeared earlier.

Thank you a lot !

Thanks guys. I’ll get this sorted.