Genie Discord forum
![Author Avatar](https://cdn.discordapp.com/avatars/839529644863520768/148ac081970ddcbfa3df9f6e5a1beb01.png?size=512)
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):
<div>
<!-- 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" />
<br>
<!-- Submit button -->
<q-btn @click="submit = true" label="Submit" />
<!-- Display the coordinates -->
<p>The coordinates are {{coords}}</p>
</div>
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
end
@onchange number begin
address[:number] = number
end
@onchange city begin
address[:city] = city
end
@onchange postalcode begin
address[:postalcode] = postalcode
end
@onchange submit begin
if submit
coords = geocode(address)
submit = false
end
end
end
And I'm only
using GenieFramework
@genietools
Because I find I do not learn well (or at all) if I bring the power tools at once.
Problem:
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 Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
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 Avatar](https://cdn.discordapp.com/avatars/839529644863520768/148ac081970ddcbfa3df9f6e5a1beb01.png?size=512)
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 Avatar](https://cdn.discordapp.com/avatars/839529644863520768/148ac081970ddcbfa3df9f6e5a1beb01.png?size=512)
Changed the channel name: Button Syntax
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
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
https://www.linkedin.com/feed/update/urn:li:activity:7117864904971149314/