Connecting to scroll_event in Vala
I've been struggling to connect to the scroll_event of a TextView widget. I can connect a lambda to it, and then run my method, but I'd like to understand why directly connecting doesn't work. I've been using the code below

    using Gtk;

    public class TextFileViewer : Gtk.Window {

        private TextView text_view;

        public TextFileViewer () {
            this.title = "Text File Viewer";
            this.position = WindowPosition.CENTER;
            set_default_size (400, 300);

            this.text_view = new TextView ();
            this.text_view.editable = true;
            this.text_view.cursor_visible = true;

    	    var scroll = new ScrolledWindow (null, null);
    	    scroll.set_policy (PolicyType.AUTOMATIC, PolicyType.AUTOMATIC);
	    scroll.add (this.text_view);

            this.text_view.scroll_event.connect (on_scroll_event);
		
            var vbox = new VBox (true, 0);
            vbox.pack_start (this.text_view, true, true, 0);
            add (vbox);
        }

	    private void on_scroll_event () {
	    	    stderr.printf("We scrollin breds");
	    }

        public static int main (string[] args) {
            Gtk.init (ref args);

            var window = new TextFileViewer ();
            window.destroy.connect (Gtk.main_quit);
            window.show_all ();

            Gtk.main ();
            return 0;
        }
    }

That code gives me the error:

    gtkviewer.vala:20.46-20.60: error: Argument 1: Cannot convert from `TextFileViewer.on_scroll_event' to `Gtk.Widget.scroll_event'
		scroll.scroll_event.connect (on_scroll_event);

vala is at version 0.12.0

Connecting to scroll_event in Vala
===

I've been struggling to connect to the scroll_event of a TextView widget. I can connect a lambda to it, and then run my method, but I'd like to understand why directly connecting doesn't work. I've been using the code below

    using Gtk;

    public class TextFileViewer : Gtk.Window {

        private TextView text_view;

        public TextFileViewer () {
            this.title = "Text File Viewer";
            this.position = WindowPosition.CENTER;
            set_default_size (400, 300);

            this.text_view = new TextView ();
            this.text_view.editable = true;
            this.text_view.cursor_visible = true;

    	    var scroll = new ScrolledWindow (null, null);
    	    scroll.set_policy (PolicyType.AUTOMATIC, PolicyType.AUTOMATIC);
	    scroll.add (this.text_view);

            this.text_view.scroll_event.connect (on_scroll_event);
		
            var vbox = new VBox (true, 0);
            vbox.pack_start (this.text_view, true, true, 0);
            add (vbox);
        }

	    private void on_scroll_event () {
	    	    stderr.printf("We scrollin breds");
	    }

        public static int main (string[] args) {
            Gtk.init (ref args);

            var window = new TextFileViewer ();
            window.destroy.connect (Gtk.main_quit);
            window.show_all ();

            Gtk.main ();
            return 0;
        }
    }

That code gives me the error:

    gtkviewer.vala:20.46-20.60: error: Argument 1: Cannot convert from `TextFileViewer.on_scroll_event' to `Gtk.Widget.scroll_event'
		scroll.scroll_event.connect (on_scroll_event);

vala is at version 0.12.0
