JuliaGizmos / Interact.jl

Interactive widgets to play with your Julia code
Other
525 stars 76 forks source link

map bang syntax help needed #409

Open arvindpandit27 opened 3 years ago

arvindpandit27 commented 3 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 3 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 3 years ago

Ahh! Thanks a lot