Subclassing Protocol: "Method not implemented" error, but method is implemented

I am trying to create a subclass of TextWatcher:

class tw: android.text.TextWatcher {
		
	func beforeTextChanged(arg1: java.lang.CharSequence!, arg2: RemObjects.Oxygene.System.Integer, arg3: RemObjects.Oxygene.System.Integer, arg4: RemObjects.Oxygene.System.Integer) {}
		
	func onTextChanged(arg1: java.lang.CharSequence!, arg2: RemObjects.Oxygene.System.Integer, arg3: RemObjects.Oxygene.System.Integer, arg4: RemObjects.Oxygene.System.Integer) {}
		
	func afterTextChanged(arg1: android.text.Editable!) {
			println("Text Changed")
	}
		
}

The problem is I keep getting the following errors when trying to build the app:

error E179: Method “beforeTextChanged(arg1: CharSequence!, arg2: Integer, arg3: Integer, arg4: Integer)” not implemented as required for interface “android.text.TextWatcher”

error E179: Method “onTextChanged(arg1: CharSequence!, arg2: Integer, arg3: Integer, arg4: Integer)” not implemented as required for interface “android.text.TextWatcher”

Note: I am not getting any errors about “afterTextChanged(arg1: android.text.Editable!)”. Something to do with the Integer parameters?

You need the _ before each 2nd+ parameter like:

class tw: android.text.TextWatcher {
		
	func beforeTextChanged(arg1: java.lang.CharSequence!, _ arg2: RemObjects.Oxygene.System.Integer, _ arg3: RemObjects.Oxygene.System.Integer, _ arg4: RemObjects.Oxygene.System.Integer) {}
		
	func onTextChanged(arg1: java.lang.CharSequence!, _ arg2: RemObjects.Oxygene.System.Integer, _ arg3: RemObjects.Oxygene.System.Integer, _ arg4: RemObjects.Oxygene.System.Integer) {}
		
	func afterTextChanged(arg1: android.text.Editable!) {
			writeLn("Text Changed")
	}
		
}

I just ran into this myself, and wanted to note that newer, Swift 3 compatible versions of the Silver compiler now also require the _ in the first parameter position as well. Like so:

extension MainActivity: TextWatcher {
	func afterTextChanged(_ s: Editable!) {
	}
	func beforeTextChanged(_ s: CharSequence!, _ start: Int32, _ count: Int32, _ after: Int32) {
	}
	func onTextChanged(_ s: CharSequence!, _ start: Int32, _ before: Int32, _ count: Int32) {
	}
}

(I like to implement these interface/protocols as extensions of course - more Swift-like).

A related item I would like some feedback on is the implicit mapping of Swift/Silver Int to the underlying Java Integer. I would expect the above Int32 to be able to be replaced with ‘Int’ - the default Swift integer type, and have the Silver compiler implicitly cast it to the underlying Android ‘int’. But it does not do this. It requires using the Java-like Integer or the Swift Int32 as seen above.

Note that it does appear that the Swift ‘Bool’ is properly being implicitly cast to the Android/Java ‘boolean’. I verified this with OnSeekBarChangeListener.