setOnActionMethod depricated

HI, :)

I am getting a warning in servoy6_rc1 for the method setOnActionMethod for a JSLabel which has seem to be depricated… :(
below is a piece of code that doesn’t show any warning in servoy 5.2 but does in servoy6_rc1…

var lblObj = frmObj.newLabel(lblText, x, y, width, height)
lblObj.setOnActionMethod(globals.monthSelectedForGraphicalSchedule);

and the ‘monthSelectedForGraphicalSchedule’ should be trigered with a JSEvent as soon as the label is clicked.
I tried with the onAction property of JSLabel in place of setOnActionMethod but failed…

Pls show me a way… :)

you are mixing runtime method (real functions) and solution model. you shouldn’t do that.

lblObj.onAction = solutionModel.getGlobalMethod(‘monthSelectedForGraphicalSchedule’);