Can't convert String into Integer

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’)

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 ))

DÅ?a Pondelok 20 Február 2006 18:43 Une bévue napísal:

@label_list[“BookmarksBar”] << folder.attributes[“label”].gsub(/"(.*)"/,
/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 ))

I can’t reproduce this. Can you make a simple full code example where
this
happens? Otherwise, I’d blame a bug someplace else and a mysterious
off-by-one line count mishap.

David V.

“Une bévue” [email protected] wrote:

@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?

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

Quoting Robert K. [email protected]:

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?

It strips the double quotes.

David V.

[email protected] schrieb im Newsbeitrag
news:[email protected]
Quoting Robert K. [email protected]:

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?

It strips the double quotes.

Blind I am. Gosh! Thanks for clearing the fog from my brain.

robert

David V. [email protected] wrote:

Otherwise, I’d blame a bug someplace else and a mysterious
off-by-one line count mishap.

Right their was a big bugg of roughly 80 Kg :
the guy betwwen my chair and the computer :wink:

in fact the error wasn’t directly coming from the line given by ruby ))

Robert K. [email protected] wrote:

Blind I am. Gosh! Thanks for clearing the fog from my brain.

:wink:

in fact i want to synchronize safari and firfox bookmaks on the safari
side some of them are written :

“Swing”

the equivalent on firefox being written :

Swing

then, i wipe out the difference;;;

DÅ?a Utorok 21 Február 2006 19:48 Une bévue napísal:

David V. [email protected] wrote:

Otherwise, I’d blame a bug someplace else and a mysterious
off-by-one line count mishap.

Right their was a big bugg of roughly 80 Kg :
the guy betwwen my chair and the computer :wink:

Those things are arguably the largest source of bugs in any software
development process. We should get rid of them one of these days and use
something more reliable.

Time to develop the Programmer 2.0 cackle.

This would arguably be funnier if them strange SW architect people
didn’t try
to make UML executable over and over again. fears for his cushy geek
career

David V.