sunaku / wmiirc

Ruby configuration for WMII window manager
ISC License
82 stars 26 forks source link

can't convert symbol to string #15

Closed ghedamat closed 14 years ago

ghedamat commented 14 years ago

Hi sunaku!

It's always me :P

recently I've installed wmii on another computer that I use @ work..

and a new issue has raised up...

when I try to use the bindings to invoke the program or action launcer

an error rises up...

it seems that the my wmii/rumai/ruby version doesn't like that much the fact that in the menu.yaml file

the words

program action etc..

are simbols..

editing the yaml file and set them as strings solved the problem but this seems strange to me.. I did not dig that much into this issue 'cause I've a lot of work to do these days, and I also think that this is caused by some error in my configuration

but maybe you can give me an hint...

wmii version: hg distro: ubuntu 10.04 ruby version: 1.9.1

thank you another time for your help...

ghedamat

sunaku commented 14 years ago

Hi ghedamat,

I could not find any symbols in menu.yaml in the default configuration. Perhaps they were remnants of your old personal configuration?

Your solution is correct. I do not use symbols in any YAML file. String keys should be used.

ghedamat commented 14 years ago

all right! tnx again for your help, sorry for late answering.. i've been quite busy these days..

tomka commented 14 years ago

The same error happened to me. Ghedamat's solution did work for me as well and if I look at menu.yaml of current tip there are actually still those lines that stopped it from working here. The following patch did it for me (probably what Ghedamat did): http://github.com/tomka/wmiirc/commit/b4c7ae404bb35c0d5eac96a2f13a4a3eaeb9b9ce

Edit: I changed too much I think. That is the right commit: http://github.com/tomka/wmiirc/commit/1e84eb6f2201cad506b3108314d283f255009491

Edit 2: I found some more calls to key_menu. I changed them as well: http://github.com/tomka/wmiirc/commit/d9375b82a3fd548b9f981678ab12005e62271778

sunaku commented 14 years ago

Thanks tomka. I pushed a simpler version of your fix to master.

tomka commented 14 years ago

Thanks for your upstream integration, I will use your simpler version (despite the fact I don't know how it works, yet :-) ).

ghedamat commented 14 years ago

Well i'll try this new solution than! :) mine was just to remove the : from :name and write it as "name" maybe this one is better...

thanks guys!

tomka commented 14 years ago

Sunaku, I tried your change, but the same error keep coming up. The problem is the following line:

history_file = File.join(HISTORY_DIR, history_name)

As long as history_name is no string it will not work. So that will do it: http://github.com/tomka/wmiirc/commit/1adb633bdc9c092dee03676b30eb0b2ee777516c

sunaku commented 14 years ago

Thanks, I accepted your patch.

tomka commented 14 years ago

Cool, thanks :-)