Excerpts from Hamish's message of Sun Jun 19 23:48:40 +0200 2011: > I've not heard anything for a bit, so I've pushed this into next for > wider testing, with the guard so that the account selector will only > appear if you have more than one email address. Shout out if it causes > any problems. This breaks the "Reply to" selector for me. Any attempt to change the value results in an exception: --- TypeError from thread: main no implicit conversion from nil to integer ./lib/sup/horizontal-selector.rb:18:in `[]' ./lib/sup/horizontal-selector.rb:18:in `val' ./lib/sup/modes/edit-message-mode.rb:374:in `update' ./lib/sup/modes/edit-message-mode.rb:351:in `move_cursor_left' ./lib/sup/modes/reply-mode.rb:174:in `move_cursor_left' ./lib/sup/mode.rb:59:in `send' ./lib/sup/mode.rb:59:in `handle_input' ./lib/sup/buffer.rb:278:in `handle_input' bin/sup:271 Reverting the account selector patches makes it work again. This is the code in edit-message-mode.rb: 372 def update 373 if @account_selector 374 if @account_selector.val.nil? 375 @header["From"] = @account_user 376 else 377 @header["From"] = AccountManager.full_address_for @account_selector.val 378 end 379 end And horizontal-selector.rb: 18 def val; @vals[@selection] end So account_selector.selection is nil. The only way for that to happen is by calling account_selector.set_to() with a value that's not in account_selector.vals (IMO HorizontalSelector should throw an exception in that case, BTW). Any idea where and why that would have happened? Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel