[Vala] Problem with switch statment



Hi,

I have a problem convert function from vala to genie, this is the code:

Vala code:
switch (eb.button) {
           case 1:
               blah blah blah
           case 2:
               blah blah blah
           case 3:
               blah blah blah
}


My genie code:

       case eb.button
           when 1
               blah blah blah
           when 2
               blah blah blah
           when 3
               blah blah blah

The problem is, when i compile, i have this message:

treeview.gs:132.9-143.13: warning: unreachable code detected
treeview.gs:132.9-146.13: warning: unreachable code detected

And my real function (not blah blah blah) does not work, what's wrong ?
Does genie support the "switch" like vala ?

Thanks in advance,
Nicolas.





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