Genie Discord forum

Author Avatarctl
9/29/2023, 2:38:57 PM

Hi, I'm a statistician very new to dashboard and web development. Goal: capture from a user an address and show its coords UIComponents (app.jl.html):

    <!-- Input fields for individual address components -->
    <q-input v-model="street" label="Street" />
    <q-input v-model="number" label="Number" />
    <q-input v-model="city" label="City" />
    <q-input v-model="postalcode" label="Postal Code" />
    <!-- Submit button -->
    <q-btn @click="submit = true" label="Submit" />
    <!-- Display the coordinates -->
    <p>The coordinates are {{coords}}</p>

reactive variables and handler:

@app begin
    @in street = ""
    @in number = ""
    @in city = ""
    @in postalcode = ""
    @in submit = false
    @out coords = ""
    @in address = Dict(:street => "", :number => "", :city => "", :postalcode => "")

    # Update the dictionary whenever any component changes
    @onchange street begin
        address[:street] = street
    @onchange number begin
        address[:number] = number
    @onchange city begin
        address[:city] = city
    @onchange postalcode begin
        address[:postalcode] = postalcode

    @onchange submit begin
        if submit
            coords = geocode(address)
            submit = false


And I'm only

using GenieFramework

Because I find I do not learn well (or at all) if I bring the power tools at once.


LoadError: syntax: invalid keyword argument name "true" around /var/folders/yn/pvy4skp56mq63d2qq0m56zlw0000gn/T/jl_genie_build_AgEMik/GenieViews/2e6e7fcc87754491a0903780c83db4e5de55751f.jl:7

Hypothesis: I think it doesn't like <q-btn @click="submit = true" label="Submit" /> or my one and only handler for the button. Help: Am I right? I cannot seem to find anything in the documentation (btw the search bar on the website doesn't return any results no matter what I type)

Author AvatarPere
9/30/2023, 4:42:44 PM

The issue is with the click event syntax. It's called like a function, so it should be @click("submit = true")

Also, the search bar is working now ๐Ÿ™‚

Author Avatarctl
9/30/2023, 4:46:13 PM

Hola Pere, thanks for the quikc response. Will try in a bit, just a quick question I don't know why I'm under the impression that you guys would be offering live lessons? is that right? I'd love to sign up if that is the case

Author Avatarctl
10/1/2023, 9:43:41 PM

Changed the channel name: Button Syntax

Author AvatarPere
10/17/2023, 10:44:26 AM

hey @ctl , we plan to give more webinars in the future. For instance, next week there's the Helsinki Julia meetup where I'll be giving a 1-hour talk