Genie Discord forum

Author AvatarWhiskers 1600X3D
10/29/2023, 5:03:27 PM

I am figuring out on how to get the quasar elements in my code. When I use quasar elements, I seem to get this error shown in the pic

Code is shown below


function ui()
    row([
        cell(class = "col-md-12", [
            textfield(class = "q-my-md", "Student ID", :IDinput)
            textfield(class = "q-my-md", "Student Name", :Nameinput)
            textfield(class = "q-my-md", "Date", :Dateinput)
        ])
    ])
    row([
        cell(class = "col-md-12", [
            radio(v-model="shape", val="line", label="A")
            radio(v-model="shape", val="line", label="B")
        ])
    ])
    row([
        cell(class = "col-md-12", [
            btn(class="q-my-md", "View", color = "primary", @click("granted =! granted"))
            btn(class="q-my-md", "Save", color = "primary", @click("granted =! granted"))
            ])
        ])
end
Author AvatarPere
10/30/2023, 9:43:45 AM

that's because julia does not accept dashes in parameter names. Check out the docstring for the components to see how to pass a reactive variable as a parameter. In general, it's the first or second argument as a symbol. This is the call for radio

radio("Line", :Radio_shape, val = "line")

Author AvatarWhiskers 1600X3D
10/30/2023, 12:26:54 PM

What's a docstring for the components?

Author AvatarPere
10/30/2023, 1:47:46 PM

Each function that generates a component, like radio, has a docstring. You can access it from the REPL

https://docs.julialang.org/en/v1/manual/documentation/#Accessing-Documentation