Robert Klemme
2/21/2006 9:50:00 AM
"Une bévue" <pere.noel@laponie.com.invalid> wrote:
> i have a hash like that :
>
> @label_list={}
>
> with only one key for the time being :
>
> @label_list["BookmarksBar"]=[]
>
> then, the value is an Array populated like that :
>
> @label_list["BookmarksBar"] <<
> folder.attributes["label"].gsub(/"(.*)"/, '\1')
This gsub is pretty useless as it will replace the string by itself. What
are you trying to do here?
> then, i want to use this hash-value by :
>
> if !@label_list["BookmarksBar"].include?(label_) # <= line 143
>
>
> this works a number of times (it's within an each loop) until label_ =
> "files" where i get :
>
> /Users/yvon/work/RubyCocoa/BookmarksMerge/build/Development/BookmarksMer
> ge.app/Contents/Resources/Controller.rb:143:in `NSApplicationMain':
> NSApplicationMain - RBException_TypeError - can't convert String into
> Integer (OSX::OCException)
>
>
> label_ are always strings...
>
> i don't understand ))
Me too. What libraries are you using? If @label_list is a normal Hash and
the entry is a normal Array, as your code snippets suggest, then I can't see
how this error can occur. Seems we need more information...
Kind regards
robert