digitalmars.D - vibe.d diet - is there a way to use a D variable inside the
- Chris Bare (11/11) Dec 29 2020 I'm trying to generate a list of buttons and insert the value
- Chris Bare (4/15) Dec 29 2020 One minute after I sent this I tried:
- Steven Schveighoffer (10/28) Dec 31 2020 Yes. Just one thing to be aware of, if i is a boolean, then the behavior...
I'm trying to generate a list of buttons and insert the value programmatically. Here's what I've tried: - foreach (i; ["Prev", "Replay", "Next"]) that does not compile. if instead I use: Is there a way to double escape the variable, or is substitution just not supported there?
Dec 29 2020
On Tuesday, 29 December 2020 at 20:16:40 UTC, Chris Bare wrote:I'm trying to generate a list of buttons and insert the value programmatically. Here's what I've tried: - foreach (i; ["Prev", "Replay", "Next"]) that does not compile. if instead I use: Is there a way to double escape the variable, or is substitution just not supported there?One minute after I sent this I tried: input(type="button",value=i) and that works.
Dec 29 2020
On 12/29/20 3:22 PM, Chris Bare wrote:On Tuesday, 29 December 2020 at 20:16:40 UTC, Chris Bare wrote:Yes. Just one thing to be aware of, if i is a boolean, then the behavior is to include "value" or not include "value" in the element. In other words: sometag(foo=true) => <sometag foo="foo"> (or something like that) sometag(foo=false) => <sometag > The only other annoying thing is that you can't use interpolations for classes directly using pug syntax, you have to use class attributes inside the parentheses. -SteveI'm trying to generate a list of buttons and insert the value programmatically. Here's what I've tried: - foreach (i; ["Prev", "Replay", "Next"]) that does not compile. if instead I use: Is there a way to double escape the variable, or is substitution just not supported there?One minute after I sent this I tried: input(type="button",value=i) and that works.
Dec 31 2020