I'm trying to make a constructor for a custom type in Julia:

type Cell
  Base::Dict{String, String}
  zLayers::Array{Dict{String, String},2}
  X::Int
  Y::Int

  Cell() = new(Dict{String,String}(),[Dict{String, String}(),Dict{String, 
String}()],0,0)
end

try
  gamestate = Cell()
catch err
  print("connection ended with error $err\n")
end

Throws error:

connection ended with error 
MethodError(convert,(Array{Dict{String,String},2},[Dict{String,String}(),Dict{String,String}()]))

So how do we do proper initialization for Arrays of Dictionaries?

Reply via email to