Hello,

I have some trouble using types in Julia. Thanks to some earlier help, I 
was able to define type Physical Node and save it in a file MyClasses.jl

module MyClasses

using DataArrays

type PhyNode{T}

  ID::Int64
  name::AbstractString
  x::Float64
  y::Float64
  inEdges::Vector{T}
  outEdges::Vector{T}

end

end

I intend to import MyClasses module to another file test.jl where I want to 
create a set of nodes. So, I wrote the following code:

importall MyClasses

nodelist = []

for a in max_nodes
    push!(nodelist, PhyNode(1, Atlanta, 32.3, 54.7))
end



But I get an error pointing to the line with the push! function. The error 
says something about include_string at base/loading.jl:288 etc.,
I also tried removing the push function and only getting an object of type 
PhysicalNode (z = PhyNode(1, Atlanta, 32.3, 54.7)) but that showed the same 
error too.
The values that I'm assigning are read out from an XML file and the name 
Atlanta is of type ASCIIString while the rest of them are in the respective 
formats as usual.
Since I'm new to Julia, I'm finding it hard to exactly find out the reason 
for this behaviour. Can you please help me?

Reply via email to