GNOME Bugzilla – Bug 690907
Problem by connecting a signal to a dynamic object
Last modified: 2018-05-22 14:39:50 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 }
-- 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.