I just wanted to discuss the new custom identifiers idea. With the new widget opcodes it is possible to retrieve the value of any identifier assigned to a Cabbage widget. It’s also possible to create custom identifiers, but we need to decide on a convention for their use. We don’t want a situation whereby a user has been using custom identifiers that suddenly become an official Cabbage identifier as it will break the users code. As it stands now, I have a restriction in place that custom identifiers must be prefixed by an underscore, but I’m open to suggestions. For example:
button bounds(144, 94, 80, 40), channel("Button"), text("0", "1"), _textInfo("this is some test")
Does this seem Ok? We could also UPPERCASE identifiers:
button bounds(144, 94, 80, 40), channel("Button"), text("0", "1"), TEXT_INFO("this is some text")
What do you think? Does anyone have any other suggestions? I’m not a big fan of UPPER CASE labels so I’m currently leaning towards the underscore. And I can’t ever imagine a time when Cabbage identifiers will ever use them. I would love to make all identifier camelCase as I find them a little difficult to read as all lower case, but that’s a different discussion!