Cabbage Logo
Back to Cabbage Site

Addressing the main "form" with identchannel?

I tried changing my main form’s colour using an identchannel, it didn’t seem to work.

Obviously it wouldn’t make sense allowing bounds changes to be sent, but could/should it be possible to change other form attributes on the fly? Colour seems obvious, but perhaps “caption” if it’s possible to change the window name on the fly… or maybe even guirefreshvalue?

I can add that. I’m away for the next week or so, but I’ll do it I get back.

Sounds good.

I think I found an oddity with checkboxes too. When used in an imported widget group, the fontcolor seems to change based on the on|off status, tho the docs only list one font color available. Try using a nice bright color to make it more obvious.

This led me to a second issue… I tried setting fontcolor:0 and fontcolor:1 for checkboxes (even tho it’s not supported, I was just trying to narrow down the previous issue) in an imported plant, and it led to parsing issues. Here’s an example plant that triggers it for me:
checkboxtest.xml (645 Bytes)

If you look at the monolithic file, it becomes a bit of a mess on that line.

Cheers. I’ll check it out. Checkboxes should support on/off. I’ll need to update the docs.

Did these changes make it in? I know you were away, so it may have missed the last official release…

I tried sending colour() to a form’s identchannel with no luck… didn’t try any other possible variables after colour tho.

And checkboxes text() in imported widget group still behaves subtly different than ones that aren’t. I didn’t test the parsing error yet… I should have, sorry :blush:

I also found another possible (probable?) bug with checkboxes… the docs show that text should be able to accept two comma separated values, for example the docs say:
checkbox bounds(116, 38, 150, 50), channel("checkbutton1"), text("Enable Tone", "Disable Tone"),
and later:
SIdent sprintf "text(\"TextOff %f\", \"TextOn %f\") ", rnd(100), rnd(100)
The text doesn’t change when running the exact example. I also tried using text:0 and text:1, but that didn’t work either.

Sorry Kevin, this slipped under the radar. I’ll try to take a look tomorrow or Thursday.

[edit] btw Kevin, where do the docs say it’s possible to set on/off text for checkboxes?

I just pushed some changes now that allow you to set the text for both on and off with checkboxes, fontcolour:0 and fontcolour:1 worked fine for me? As for changing the colour of the main form, it’s best to just use an image that covers the entire area of the instrument. form is technically not a widget, hence it doesn’t have the same functionality as other things. I’ll let you know when there is a new beta ready.

New beta for OSX available now.

No worries, I figured it might have. I know you were busy and away a lot that week. I’ve been busy doing huge changes to my projects too, so I wasn’t rushed for these updates anyway.

Yeah, I know the image layover is a possibility… but I was also interested in being able to change other aspects of the form, such as the gui refresh rate (if it’s even possible without a restart of cabbage), and perhaps the window name too. That’s not really an important feature to me tho, was just something I thought could be cool and useful in a few very specific situations.

It doesn’t! That’s part of what I’m pointing out… the example shows that it should be possible in two places, tho it doesn’t work… and the docs make no mention of it at all.

I’ll take another look at this, and my previously sent example… IIRC the problem was when setting both fontcolours from an imported group of widgets, I think they would crash or create some other strange parsing oddity. Honestly it’s been a few weeks since I tested the problem :wink:

Also an oddity with checkboxes was setting only fontcolour() works normally outside of imported widgets with both states using the color, but in imported widgets you end up with two different colors between states. It’s a pretty subtle bug, especially depending on what font colors you’re using. Try using a really bright fontcolour(), it makes the change with state easier to notice.

Fantastic, that should allow me to clean a few unnecessary UDOs and identchannels just for flipping text on my checkboxes :slight_smile: I’ll give it a shot tonight.

Thanks Rory!

Well, I’m already having some SERIOUS trouble with the new beta… :confused:

While the two modes of text appears to be working great (Thanks again!), now I’m not able to read the channels from my checkboxes either when used directly or in imported widget groups. The CB changes state, but I get no channel update.

I’ve tested this with both my crazy macro schemes, and using a regular old fashioned checkbox, same result. When I backed up to the release version the channels went back to working as expected.

What example are you referring too?

Sorry, fixed now. I’ll post a new binary shortly.

Sorry, I see how that wasn’t clear… the “example” I had quoted before is from the checkbox docs:
http://cabbageaudio.com/docs/checkbox/

In the example there, the cabbage section has a checkbox that had on,off style text… and later in that example it sends the random numbers to the identchannel.

The actual doc section for text makes no mention of it… but since it’s been added, it probably should :wink:

While we’re discussing them and you’re looking at them… do you think checkboxes should get popuptext along with the prefixes/postfixes? I’m trying to make popups on my instrument as descriptive as possible, and I think it could be useful.

No worries… I forgot to check before I backported to the release, did the spaces get fixed in popupprefix/postfix handling? It hadn’t in the release. IIRC that was another one that I think popped up (no pun intended, lol) while you were away.

I guess if checkboxes get them, then buttons should too?

Not sure if that’s sarcastic… but either way, I wouldn’t argue against it… I found out CB’s didn’t have it because I tried setting it just assuming it would work as normal. I figured all widgets had it, honestly.

Does it incur any extra overhead to have it? If it’s something that seems like it would rarely be used and adds overhead to all checkboxes or buttons, I can easily be convinced it’s not worth it :wink:

It was a genuine question (for a change :innocent:) I’ll add it to the list.

As long as you think it logically makes sense, I’m just an idea guy here :wink:

I’m honestly on the fence with prefix/postfix for the two… I can’t see much of a use for them, but figured if adding one why not both? Sometimes a perfect use isn’t always clear in the beginning… so maybe someone else might have an idea for a good use of them.