Re: [sawfish] Re: `position' in rep...?



6 hours ago, Christopher Roy Bratusek wrote:
> Now in SawfishConfig this code is used (with different
> variable-names):
> 
> (gtk-combo-box-text-set-active widget (position value list))
> [...]
> 
> A GtkComboBoxText expects the index-number not the text, so position
> is used to return it, with your version of position we get:
> 
> *** Bad argument: #<subr gtk-combo-box-set-active>, (), 2

Yes, if the value is not found, it returns false, which in rep is the
empty list.  If you can't rely on the value being found, then just
protect the use, either with a default:

  (gtk-combo-box-text-set-active widget (or (position value list) 0))

or by just not doing it:

  (let ((i (position value list)))
    (when i (gtk-combo-box-text-set-active widget i)))


> [...]
> corresponding code resides in sawfish.gtk.widget (choice and symbol
> widgets), in misc-1.9 branch.

I don't see this branch at git://git.gnome.org/sawfish


5 hours ago, Christopher Roy Bratusek wrote:
> [...]
> Now I've seen the problem:
> 
> (a b c) Vs '(a b c)

That sounds like it was a different problem...

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]