|
|
Re: List listener problem [message #62821 is a reply to message #62746] |
Sun, 25 November 2007 13:18 |
Christian Messages: 31 Registered: July 2009 |
Member |
|
|
Val,
Thanks for your answer. Do you think I should open a bug for this
version?Or realese version 1.1 will contain this bug fixed anyway?
Christian
Val ha scritto:
> Hi
>
> I have ran your example and indeed it did not work, but that on the
> 1.0.1 integration build.
> If u use release version 1.0 it works just fine.
>
> Also the demo application does not work fine regarding list selection,
> when using version 1.0.1
>
> Cheers,
> Val
>
> Christian wrote:
>> Hi,
>>
>> i've added a Selection listener to a List; if i select some components
>> on the List, and invoking the method List.getSelection in the
>> implemented listener, it returns no items selected. Can be a bug?
>>
>> here the code
>>
>>
>> list = new List(sectionClient2, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL
>> | SWT.BORDER);
>> list.add("item");
>> list.add("item2");
>> list.addListener(SWT.Selection,listener);
>>
>>
>>
>> public final class MyListener implements Listener {
>>
>> public void handleEvent(Event arg0) {
>> System.out.println(arg0);
>> String[] ele = list.getSelection();
>> for (int i = 0; i < ele.length; i++) {
>> System.out.println(ele[i]);
>> }
>>
>> }
>> }
>>
>>
>> thx
>>
>> Christian
|
|
|
Re: List listener problem [message #62853 is a reply to message #62821] |
Sun, 25 November 2007 14:32 |
Valer Roman Messages: 36 Registered: July 2009 |
Member |
|
|
Hi
yes I think u should open a bug report for that version. Also mention
that in the demo application the list selection does not work properly.
ciao,
Val
Christian wrote:
> Val,
> Thanks for your answer. Do you think I should open a bug for this
> version?Or realese version 1.1 will contain this bug fixed anyway?
> Christian
>
>
> Val ha scritto:
>> Hi
>>
>> I have ran your example and indeed it did not work, but that on the
>> 1.0.1 integration build.
>> If u use release version 1.0 it works just fine.
>>
>> Also the demo application does not work fine regarding list selection,
>> when using version 1.0.1
>>
>> Cheers,
>> Val
>>
>> Christian wrote:
>>> Hi,
>>>
>>> i've added a Selection listener to a List; if i select some components
>>> on the List, and invoking the method List.getSelection in the
>>> implemented listener, it returns no items selected. Can be a bug?
>>>
>>> here the code
>>>
>>>
>>> list = new List(sectionClient2, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL
>>> | SWT.BORDER);
>>> list.add("item");
>>> list.add("item2");
>>> list.addListener(SWT.Selection,listener);
>>>
>>>
>>>
>>> public final class MyListener implements Listener {
>>>
>>> public void handleEvent(Event arg0) {
>>> System.out.println(arg0);
>>> String[] ele = list.getSelection();
>>> for (int i = 0; i < ele.length; i++) {
>>> System.out.println(ele[i]);
>>> }
>>> }
>>> }
>>>
>>>
>>> thx
>>>
>>> Christian
|
|
|
Powered by
FUDForum. Page generated in 0.04295 seconds