Silly question, how do I access variables, lists, strings, etc from other widgets from the same and other cards
I can't seem to be able to remember it (took a long break from making stuff in Decker)
If you have a widget on the same card you can just access it by name
So like if you have a field called field1 you can just use field1.text or whatever you need.
If a widget is on a different card (e.g. card1) you can access it like card1.widgets.field1.text for example.
You may want to check the Decker reference manual in the "Interfaces" section where it lists all the different properties of each widget type.
Hope this answers your question :)
Here's an at-a-glance selection of some ways to refer to different kinds of stored data in basic widgets, using attributes:
Buttons: .value (boolean true/false)
Fields: .text (plain text) .value (rich text) .data (LOVE data) or .images (images only)
(it's a little visually chaotic but an interactive example of the difference between these four can be found here)
Canvases: .copy[] and .paste[]
Sliders: .value (the number it's currently set to)
Grids: .value (for the whole table), .rowvalue and .cellvalue
---
And to refer to a .value attribute of a widget on the same card:
widgetname.value
Or to refer to a .value of a widget on another card:
othercardname.widgets.widgetname.value
And if things have less script-friendly names you can refer to them with square brackets:
deck.cards["Silly Card Name"].widgets["I'm a Widget"].value
---
I hope this helps point you in the right direction!
The enum contraption exposes its string value through a .value attribute. Internally, like any contraption, this is handled by get_value[] and set_value[].
I think you're going to need to describe more about what you're trying to do- and especially show the scripts you're trying to use- for us to diagnose what's going wrong.