After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 690907 - Problem by connecting a signal to a dynamic object
Problem by connecting a signal to a dynamic object
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Semantic Analyzer
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2012-12-30 22:02 UTC by Corentin Noël
Modified: 2018-05-22 14:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Corentin Noël 2012-12-30 22:02:09 UTC
I have a class wich has a public dynamic Gst.Element.
when in my main programm, I try to connect to a signal (source_setup for example), the compiler says that Gst.Element doesn't have the source_setup signal.
As the object is dynamic, it should work.

Maybe this code example would be better:

// In a first file
public class MyObject : GLib.Object {
	 
	public dynamic Gst.Element playbin;
	public MyObject () {

		playbin = Gst.ElementFactory.make("playbin2", "play");
	}
}


// In a second file
public dynamic Gst.Element playbin2;
int main (string[] args) {
    try {
        Gst.init_check (ref args);
    } catch (Error err) {
        error ("Could not init GStreamer: %s", err.message);
    }
        pipe = new MyObject ();
        pipe.playbin.source_setup.connect (pipe_source_setup); // It doesn't work
        playbin2 = pipe.playbin;
        playbin2.source_setup.connect (pipe_source_setup); // It woks
}
Comment 1 GNOME Infrastructure Team 2018-05-22 14:39:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/348.