MOE not support UIEvent?

Dear all,

I found out I cannot bind any things with event. it will crash in emulator. or am I miss any things ?

Bellow, is a code that generated from binding.

Thanks
Ivan

@Generated
@IBAction
@Selector("sld_slider:forEvent:")
public void sld_sliderForEvent(UISlider sender, UIEvent event) {
}

Dear ivanooi Ivan!

I tried this code and it works fine:

@Override
public void viewDidLoad() {
	super.viewDidLoad();

	slider().addTargetActionForControlEvents(this, new SEL("sld_slider:forEvent:"), UIControlEvents.AllEvents);
}

@Generated
@IBAction
@Selector("sld_slider:forEvent:")
public void sld_sliderForEvent(UISlider sender, UIEvent event) {
	System.out.println("Event: " + event.toString());
}

@Property
@Selector("slider")
public native UISlider slider();

Best Regards,
Roland

Test project:

MyApp.zip (77.4 KB)

1 Like

Thanks Roland!

Ya! it work! :smiley: