From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.142.50.5 with SMTP id x5cs45125wfx; Mon, 20 Jun 2011 06:59:32 -0700 (PDT) Received: by 10.224.201.70 with SMTP id ez6mr4131327qab.176.1308578372405; Mon, 20 Jun 2011 06:59:32 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id fk3si4824605qab.35.2011.06.20.06.59.31; Mon, 20 Jun 2011 06:59:31 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id CC3D81858376; Mon, 20 Jun 2011 09:59:30 -0400 (EDT) Received: from smtp.chost.de (setoy.chost.de [217.160.209.225]) by rubyforge.org (Postfix) with ESMTP id C02921858363 for ; Mon, 20 Jun 2011 09:48:07 -0400 (EDT) Received: (qmail 25276 invoked by uid 5015); 20 Jun 2011 13:48:00 -0000 Received: (nullmailer pid 26899 invoked by uid 8193); Mon, 20 Jun 2011 13:48:06 -0000 Received: (nullmailer pid 2891 invoked by uid 8193); Mon, 20 Jun 2011 13:48:04 -0000 To: Hamish In-reply-to: <1308520036-sup-7949@whisper> References: <1300032642-sup-9716@mailer> <1306775826-sup-4909@whisper> <1308520036-sup-7949@whisper> Date: Mon, 20 Jun 2011 15:47:57 +0200 Message-Id: <1308577441-sup-8658@xo15-sascha.sascha.silbe.org> User-Agent: Sup/git MIME-Version: 1.0 From: Sascha Silbe Cc: sup-devel Subject: Re: [sup-devel] [PATCHES] Add an account selector in edit-mode X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1143404069==" Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org --===============1143404069== Content-Transfer-Encoding: 8bit Content-Type: multipart/signed; boundary="=-1308577684-673214-2746-4976-2-="; protocol="application/pgp-signature" --=-1308577684-673214-2746-4976-2-= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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"] =3D @account_user 376 else 377 @header["From"] =3D AccountManager.full_address_for @account_s= elector.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/ --=-1308577684-673214-2746-4976-2-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.0beta1 (GNU/Linux) iQEcBAEBCgAGBQJN/0+NAAoJELpz82VMF3DaGEUH/3ViZw7cYMQ5PCCa53vwMB6P 6vg7dLSlPxGT7UF7WLnPRorq9Y3uD0yusqJ3mobUWYVKt24K7uluEvASrUhSPO2b xmJxUtQV/BRCohpl5wd/HkLjNAIbgk7eZjRr0EzQhybPpHwMEGDqC07dW9/OS+Po nq3qBAj6n4k63KZ8weh6d7O43HSgee3I0WHwxzNACLFD4AAbqMPmsPcYvF02yhuP 3xwhRJAjyEoszWR3dDDeDGE5gLZVNGzHYtv+DoBZgzrqg/0hBJGspW0ELb+f2BqM QE7U+kiy3NsHhcLJKEXeTkWYsqtywZmFhOmOrwl9aF407G7+xvneDjRXiCghOXY= =zIGH -----END PGP SIGNATURE----- --=-1308577684-673214-2746-4976-2-=-- --===============1143404069== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel --===============1143404069==--