JuliaGizmos / Interact.jl

Interactive widgets to play with your Julia code
Other
522 stars 77 forks source link

map bang syntax help needed #409

Open arvindpandit27 opened 2 years ago

arvindpandit27 commented 2 years ago

I am trying to make a GUI using Interact.jl and following the tutorial mentioned in their page but somehow seem to get stuck at using map! on a CSV.read operation for an observable type dataframe and a filepicker. I have the following code:

using CSV, DataFrames, Interact, Plots, _Blink_
loadbutton = filepicker()
data = Observable{Any}(DataFrame)
map!(CSV.read,data, loadbutton)

I get the following error: ArgumentError: provide a valid sink argument, like using DataFrames; CSV.read(source, DataFrame)

Any help will be greatly appreciated! /\

piever commented 2 years ago

This isn't really an Interact issue, but rather a consequence that CSV.read has changed syntax, so now it should be

map!(source -> CSV.read(source, DataFrame), data, loadbutton)
arvindpandit27 commented 2 years ago

Ahh! Thanks a lot