jverzani / PySide.jl

julia interface for accessing Qt via PyCall and PySide
MIT License
18 stars 6 forks source link

fix getindex issue #2

Closed jverzani closed 11 years ago

jverzani commented 11 years ago

ERROR: no method getindex(Module,ASCIIString) in qt_enum at /Users/verzani/.julia/PySide/src/qtutils.jl:19

and elsewhere

timholy commented 11 years ago

FYI I see this when running the pyqtgraph demo.

jverzani commented 11 years ago

Ooops, can you checkout the master of PySide? I need to push changes to METADATA.

timholy commented 11 years ago

For me this happens on master. Starting a fresh julia, and issuing include("pyqtgraph.jl") from inside the examples directory as the one-and-only command.

julia> include("pyqtgraph.jl")
Warning: New definition 
    getindex(DataArray{T,N},Union(Ranges{T},Array{T,1})) at /home/tim/.julia/DataFrames/src/dataarray.jl:356
is ambiguous with 
    getindex(DataArray{T<:Number,N},Union(Ranges{T},Array{T,1},BitArray{1})) at /home/tim/.julia/DataFrames/src/dataarray.jl:340.
Make sure 
    getindex(DataArray{T<:Number,N},Union(Ranges{T},Array{T,1}))
is defined first.
Warning: New definition 
    setindex!(GridLayout,QtLayout,Union(Range1{T<:Real},Int64,Range{T<:Real}),Union(Range1{T<:Real},Int64,Range{T<:Real})) at /home/tim/.julia/PySide/src/qtextras.jl:256
is ambiguous with 
    setindex!(GridLayout,Union(QtWidget,PyObject),Union(Range1{T<:Real},Int64,Range{T<:Real}),Union(Range1{T<:Real},Int64,Range{T<:Real})) at /home/tim/.julia/PySide/src/qtextras.jl:244.
Make sure 
    setindex!(GridLayout,QtLayout,Union(Range1{T<:Real},Int64,Range{T<:Real}),Union(Range1{T<:Real},Int64,Range{T<:Real}))
is defined first.
Warning: imported binding for transpose overwritten in module __anon__
WARNING: min(x) is deprecated, use minimum(x) instead.
ERROR: no method getindex(Module,Symbol)
 in include at boot.jl:238
at /home/tim/.julia/PySide/examples/pyqtgraph.jl:89

julia> pyqtgraph
__anon__

julia> typeof(pyqtgraph)
Module
jverzani commented 11 years ago

Okay, my bad. I commented out a bunch of stuff in that package, as I didn't need it for JGUI. It is needed here. Unfortunately, I can't push a change to github from campus so it will have to wait until tonight. If you want to do it locally, you need to uncomment in src/PySide.jl

With that, I get the first 6 of 9 graphs drawn (It stops at QTimer call which is likely in need of exporting) with this

using PySide
reload(Pkg.dir("PySide", "examples/pyqtgraph.jl"))