Comments (6)
Btw, the usage of Index and Form can be simplified like below, just use Index.ui instead of Main.App.Index.ui.
module App
using GenieFramework
@genietools
include("Index.jl")
include("Form.jl")
@page("/", Index.ui, model=Index)
@page("/form", Form.ui, model=Form)
end
from genie.jl.
It works if I downgrade to:
Julia 1.9.4
(GeniePlay) pkg> status
[c43c736e] Genie v5.21.2 https://github.com/GenieFramework/Genie.jl.git#v5.21.2
[a59fdf5c] GenieFramework v1.26.4 https://github.com/GenieFramework/GenieFramework.jl.git#v1.26.4
It does not work if I:
Julia 1.10
(GeniePlay) pkg> st
[c43c736e] Genie v5.21.2 https://github.com/GenieFramework/Genie.jl.git#v5.21.2
[a59fdf5c] GenieFramework v1.26.4 https://github.com/GenieFramework/GenieFramework.jl.git#v1.26.4
So it's not just Julia 1.10, also the most recent versions of GenieFramework and Genie are causing this in Julia 1.9.4.
from genie.jl.
@essenciary @hhaensel looks like the browser cannot subscribe to the channel
I downgraded Genie to 5.21.2 as suggested by @MariusDrulea and it works on Julia 1.9.3. This is the code I'm testing with
module App
using GenieFramework
@genietools
module Index
using GenieFramework
@app begin
@out name = "John"
end
function ui()
h1("Welcome {{name}}!")
end
end
module Form
using GenieFramework
using Statistics
@app begin
@in N = 0
@out m = 0.0
@onchange N begin
@show N
m = mean(rand(N))
end
end
function ui()
cell([
textfield("How many numbers?", :N)
p("The average of {{N}} random numbers is {{m}}")
])
end
end
using .Index
using .Form
@page("/", Main.App.Index.ui, model= Main.App.Index)
@page("/form", Main.App.Form.ui, model= Main.App.Form)
end
from genie.jl.
@MariusDrulea @PGimenez thanks, I'll allocate some time to debug it.
from genie.jl.
@MariusDrulea @PGimenez this is fixed in Stipple 0.27.30 but will require an extra configuration Stipple.ALWAYS_REGISTER_CHANNELS[] = true
Previous example adapted:
module App
using GenieFramework
@genietools
module Index
using GenieFramework
Stipple.ALWAYS_REGISTER_CHANNELS[] = true
@app begin
@out name = "John"
end
function ui()
h1("Welcome {{name}}!")
end
end
module Form
using GenieFramework
using Statistics
Stipple.ALWAYS_REGISTER_CHANNELS[] = true
@app begin
@in N = 0
@out m = 0.0
@onchange N begin
@show N
m = mean(rand(N))
end
end
function ui()
cell([
textfield("How many numbers?", :N)
p("The average of {{N}} random numbers is {{m}}")
])
end
end
using .Index
using .Form
@page("/", Main.App.Index.ui, model= Main.App.Index)
@page("/form", Main.App.Form.ui, model= Main.App.Form)
end
from genie.jl.
I think we can improve on this, ex in the @page
macro, if we pass the model explicitly, we should maybe automatically enable Stipple.ALWAYS_REGISTER_CHANNELS[]
.
Or better understand the difference between explicitly passing models or not... Something behaves differently.
from genie.jl.
Related Issues (20)
- integration with OpenAPI HOT 5
- Add "base_url" option, to "up()" to lop off referrer route path sent in from proxy servers (e.g. nginx)? HOT 7
- Loading Genie affects conversion of JSON3.Dict into Dict HOT 2
- Passing variables to `html` renderer yields key not found error HOT 4
- hot reload not possible once application hit the error, it require new bootstrap even in GENIE_ENV=dev HOT 4
- Genie.Logger.initialize_logging causes slow Arrow writes HOT 5
- Error reporting dumps sensitive information HOT 3
- Setting EARLYBIND "true" in Dockerfile causes port in use error HOT 3
- index-base transation missing. HOT 1
- Syntax error in first dashboard tutorial HOT 2
- [Bug] can't access own structure's properties in the reactive way HOT 11
- Typos in "your first dashboard" page in the website HOT 3
- Bug: Genie.Renderer.Html.html changes encoding when used with filepath HOT 2
- GC corrution in Genie[Session] HOT 1
- Applications compiled with Genie 5.23.x crashes (expected package `TimeZones [f269a46b]` to exist in the manifest) HOT 1
- Layout example does not work HOT 1
- Issues with the controller example from the docs HOT 4
- How to make the new Genie work behind nginx HOT 12
- Genie gives rise to a large number of GenieSession files via GenieSessionFileSession with enormous footprint >300GB HOT 26
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from genie.jl.