Yes - I feel dirty joining the list to ask a supportish question.
I'm a little confused OpenCasecade acts weirdly when it's initialized with a hash that uses
strings as keys.
So this example works as expected:
books = {:title => "A book's title", :author => "John Smith", :isbn => 123456}
=> {:title=>"A book's title", :author=>"John Smith", :isbn=>123456}
my_cascade = OpenCascade[books]
=> {:title=>"A book's title", :author=>"John Smith", :isbn=>123456}
my_cascade.title
=> "A book's title"
my_cascade.author
=> "John Smith"
my_cascade[:section] = "Science Fiction"
=> "Science Fiction"
my_cascade.section
=> "Science Fiction"
my_cascade
=> {:title=>"A book's title", :author=>"John Smith", :isbn=>123456, :section=>"Science Fiction"}
But things go wonky if the keys of books are strings.
books = {"title" => "A book's title", "author" => "John Smith", "isbn" => 123456}
=> {"isbn"=>123456, "author"=>"John Smith", "title"=>"A book's title"}
my_cascade = OpenCascade[books]
=> {"title"=>"A book's title", "author"=>"John Smith", "isbn"=>123456}
my_cascade.title
=> {}
my_cascade
=> {:title=>{}, "title"=>"A book's title", "author"=>"John Smith", "isbn"=>123456}
Curious what others in this situation do and why the library is implemented this way.
It seems like a common enough problem where the authors see this as a feature, not a bug.
Thanks for your time! - and thanks for the great library.