From: Sascha Silbe <sascha-ml-reply-to-2011-3@silbe.org>
To: Hamish <dmishd@gmail.com>
Cc: sup-devel <sup-devel@rubyforge.org>
Subject: Re: [sup-devel] [PATCHES] Add an account selector in edit-mode
Date: Mon, 20 Jun 2011 15:47:57 +0200 [thread overview]
Message-ID: <1308577441-sup-8658@xo15-sascha.sascha.silbe.org> (raw)
In-Reply-To: <1308520036-sup-7949@whisper>
[-- Attachment #1.1: Type: text/plain, Size: 1674 bytes --]
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 #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]
[-- Attachment #2: Type: text/plain, Size: 143 bytes --]
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel
next prev parent reply other threads:[~2011-06-20 13:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-13 16:13 Damien Leone
2011-03-13 20:21 ` Sascha Silbe
2011-05-30 17:23 ` Hamish
2011-06-19 21:48 ` Hamish
2011-06-20 8:08 ` Damien Leone
2011-06-20 13:47 ` Sascha Silbe [this message]
2011-06-20 21:38 ` Hamish Downer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1308577441-sup-8658@xo15-sascha.sascha.silbe.org \
--to=sascha-ml-reply-to-2011-3@silbe.org \
--cc=dmishd@gmail.com \
--cc=sup-devel@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox