combo problem [message #22092] |
Fri, 04 May 2007 09:13 |
Eclipse User |
|
|
|
Originally posted by: manuel.staechele.levante-software.ch
hi,
have the following app
class x
private Combo a;
private fillCombo
a.add(val1);
private onclick
i = a.getSelectionIndex();
alert(i);
i get ever a return: -1
i test to a.add(val1, i) (i = i++ in a while) but the same
i also can not add random int indexes (a.add(val1, random());) error:
index out of bounds
that is a problem for me because i want to explorer a database table
(e.g country(id, name)) to a combo and inert the value the user selected
in the database)
|
|
|
Re: combo problem [message #22138 is a reply to message #22092] |
Fri, 04 May 2007 09:27 |
Eclipse User |
|
|
|
Originally posted by: roberto.sanchez.autonomind.com
Hi Manuel, I had a similar problem, method getSelectionIndex() always
returns -1 You can see it here:
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=185039).
I'm not sure if is the same situation, in any case It's possible that
bug comments can help you.
Regards.
Roberto.
Manuel Staechele wrote:
> hi,
>
> have the following app
>
> class x
>
> private Combo a;
>
>
> private fillCombo
> a.add(val1);
>
> private onclick
> i = a.getSelectionIndex();
> alert(i);
>
> i get ever a return: -1
> i test to a.add(val1, i) (i = i++ in a while) but the same
> i also can not add random int indexes (a.add(val1, random());) error:
> index out of bounds
> that is a problem for me because i want to explorer a database table
> (e.g country(id, name)) to a combo and inert the value the user selected
> in the database)
|
|
|
Re: combo problem [message #22182 is a reply to message #22138] |
Fri, 04 May 2007 09:51 |
Eclipse User |
|
|
|
Originally posted by: manuel.staechele.levante-software.ch
thanks Roberto,
a bit uncomfortable solution, but it work ;-)
greetings
manuel
Roberto Sánchez schrieb:
> Hi Manuel, I had a similar problem, method getSelectionIndex() always
> returns -1 You can see it here:
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=185039).
>
> I'm not sure if is the same situation, in any case It's possible that
> bug comments can help you.
>
> Regards.
> Roberto.
>
> Manuel Staechele wrote:
>> hi,
>>
>> have the following app
>>
>> class x
>>
>> private Combo a;
>>
>>
>> private fillCombo
>> a.add(val1);
>>
>> private onclick
>> i = a.getSelectionIndex();
>> alert(i);
>>
>> i get ever a return: -1
>> i test to a.add(val1, i) (i = i++ in a while) but the same
>> i also can not add random int indexes (a.add(val1, random());) error:
>> index out of bounds
>> that is a problem for me because i want to explorer a database table
>> (e.g country(id, name)) to a combo and inert the value the user
>> selected in the database)
|
|
|
Re: combo problem [message #22229 is a reply to message #22138] |
Fri, 04 May 2007 10:29 |
Eclipse User |
|
|
|
Originally posted by: manuel.staechele.levante-software.ch
>> i also can not add random int indexes (a.add(val1, random());) error:
>> index out of bounds
>> that is a problem for me because i want to explorer a database table
>> (e.g country(id, name)) to a combo and inert the value the user
>> selected in the database)
i there also a solution available?
otherwise i must get the text, then get the index by the text out of the
table ... little long-winded...
|
|
|
Powered by
FUDForum. Page generated in 0.03525 seconds