Stipple.jl: import Stipple causes UndefVarError: @with_kw not defined

import Stipple
import StippleUI
import StipplePlotly

import Clustering
import RDatasets: dataset
import DataFrames

data = DataFrames.insertcols!(dataset("datasets", "iris"), :Cluster => zeros(Int, 150))
@Stipple.reactive mutable struct IrisModel <: Stipple.ReactiveModel
        iris_data::Stipple.R{import Stipple
import StippleUI
import StipplePlotly

import Clustering
import RDatasets: dataset
import DataFrames

data = DataFrames.insertcols!(dataset("datasets", "iris"), :Cluster => zeros(Int, 150))
@Stipple.reactive mutable struct IrisModel <: Stipple.ReactiveModel
        iris_data::Stipple.R{StippleUI.DataTable} = StippleUI.DataTable(data)
        credit_data_pagination::StippleUI.DataTablePagination = StippleUI.DataTablePagination(rows_per_page=50)

        features::Stipple.R{Vector{String}} = ["SepalLength", "SepalWidth", "PetalLength", "PetalWidth"]
        xfeature::Stipple.R{String} = ""
        yfeature::Stipple.R{String} = ""

        iris_plot_data::Stipple.R{Vector{StipplePlotly.PlotData}} = []
        cluster_plot_data::Stipple.R{Vector{StipplePlotly.PlotData}} = []
        layout::Stipple.R{StipplePlotly.PlotLayout} = StipplePlotly.PlotLayout(plot_bgcolor = "#ccc")

        no_of_clusters::Stipple.R{Int} = 3
        no_of_iterations::Stipple.R{Int} = 10
       end
ERROR: LoadError: UndefVarError: @with_kw not defined
in expression starting at Mixers.jl:79.DataTable} = StippleUI.DataTable(data)
        credit_data_pagination::StippleUI.DataTablePagination = StippleUI.DataTablePagination(rows_per_page=50)

        features::Stipple.R{Vector{String}} = ["SepalLength", "SepalWidth", "PetalLength", "PetalWidth"]
        xfeature::Stipple.R{String} = ""
        yfeature::Stipple.R{String} = ""

        iris_plot_data::Stipple.R{Vector{StipplePlotly.PlotData}} = []
        cluster_plot_data::Stipple.R{Vector{StipplePlotly.PlotData}} = []
        layout::Stipple.R{StipplePlotly.PlotLayout} = StipplePlotly.PlotLayout(plot_bgcolor = "#ccc")

        no_of_clusters::Stipple.R{Int} = 3
        no_of_iterations::Stipple.R{Int} = 10
       end
ERROR: LoadError: UndefVarError: @with_kw not defined
in expression starting at Mixers.jl:79

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (14 by maintainers)

Most upvoted comments

A new version of Mixers.jl has been released with my proposed PR. I updated Stipple accordingly. With the latest master branch you now can do

julia> import Stipple

julia> Stipple.@reactive mutable struct Example <: Stipple.ReactiveModel
           x::Stipple.R{Int} = 1
       end
Example