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 ))
···
--
une bévue
Dňa Pondelok 20 Február 2006 18:43 Une bévue napísal:
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 ))
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 Vallner
Robert
(Robert)
21 February 2006 09:53
3
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
···
"Une bévue" <pere.noel@laponie.com.invalid> wrote:
Quoting Robert Klemme <bob.news@gmx.net>:
> 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 Vallner
Right their was a big bugg of roughly 80 Kg :
the guy betwwen my chair and the computer
in fact the error wasn't directly coming from the line given by ruby ))
···
David Vallner <david@vallner.net> wrote:
Otherwise, I'd blame a bug someplace else and a mysterious
off-by-one line count mishap.
--
une bévue
Robert
(Robert)
21 February 2006 17:58
6
<david@vallner.net> schrieb im Newsbeitrag news:1140541177.43fb46f95fa5a@mail.atlantis.sk...
Quoting Robert Klemme <bob.news@gmx.net>:
> 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
Dňa Utorok 21 Február 2006 19:48 Une bévue napísal:
> 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
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 Vallner
···
David Vallner <david@vallner.net> wrote:
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;;;
···
Robert Klemme <bob.news@gmx.net> wrote:
Blind I am. Gosh! Thanks for clearing the fog from my brain.
--
une bévue