|
|
Re: Combo-(viewer) XWT-Databinding trouble [message #901178 is a reply to message #901164] |
Fri, 10 August 2012 08:33 |
Jürgen Weinberger Messages: 42 Registered: August 2012 |
Member |
|
|
Yes, but that seems to be my next problem. Event handling won't work.
Started following experiment and nothing (button nor combo) works.
Exceptions are always Eventhandler "onSelection" not found and Eventhander "onModifyCombo" not found.
package aasdaa;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
public class HelloWorld extends Composite {
public HelloWorld(Composite parent, int style) {
super(parent, style);
// TODO Auto-generated constructor stub
}
/**
* @param Object
* @param Event
*/
protected void onSelection(Object o, Event event) {
System.out.println("Button pressed");
}
/**
* @param Object
* @param Event
*/
public void onModifyCombo(Object object, Event event) {
System.out.println("Combo modified");
}
}
I also tried this code without the object parameter in the method call and just the Event parameter, as suggested in some tutorials. Same result
<Composite xmlns="http://www.eclipse.org/xwt/presentation"
xmlns:x="http://www.eclipse.org/xwt"
xmlns:c="clr-namespace:aasdaa"
xmlns:j="clr-namespace:java.lang"
x:Class="aasdaa.HelloWorld">
<Composite.layout>
<GridLayout numColumns="3" />
</Composite.layout>
<Button text="hello" x:style="SWT.PUSH" selectionEvent="onSelection">
</Button>
<Combo x:style="SWT.NONE" modifyEvent="onModifyCombo">
<Combo.items></Combo.items>
</Combo>
</Composite>
I think this should work but i don't have an idea why it doen't.
regards weinma
[Updated on: Fri, 10 August 2012 08:34] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02604 seconds