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 509736 - Signal and the function with the same name
Signal and the function with the same name
Status: RESOLVED DUPLICATE of bug 473804
Product: vala
Classification: Core
Component: general
0.1.x
Other All
: Normal minor
: ---
Assigned To: Jürg Billeter
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-15 20:05 UTC by Maciej (Matthew) Piechotka
Modified: 2008-01-17 15:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Maciej (Matthew) Piechotka 2008-01-15 20:05:26 UTC
Please describe the problem:
In certain classes there are signal and function with the same name. In addition sometimes both play crutial role (like for example realized in implementing GtkWidget). 

Steps to reproduce:
Find an object where signal and the finction has the same name (like GtkWidget)


Actual results:
Try overload function and use signal

Expected results:
Both should be achivable

Does this happen every time?
Yes

Other information:
Comment 1 Maciej (Matthew) Piechotka 2008-01-16 00:10:56 UTC
Something like that should solve the specific problem about GtkWidget, however it do not solve the problem in general.

Index: vapi/gtk+-2.0.vapi
===================================================================
--- vapi/gtk+-2.0.vapi	(revision 839)
+++ vapi/gtk+-2.0.vapi	(working copy)
@@ -1024,6 +1024,8 @@
 		public void reparent (Gtk.Widget new_parent);
 		public void reset_rc_styles ();
 		public void reset_shapes ();
+		[CCode (cname = "gtk_widget_realize", vfunc_name = "realize")]
+		public virtual void realize_widget();
 		public int send_expose (Gdk.Event event);
 		public void set_accel_path (string accel_path, Gtk.AccelGroup accel_group);
 		public void set_app_paintable (bool app_paintable);

However:
1. What's the best naming convention (is it possible to have it as one name as in Gtk#)
2. How to autogenerate it.
Comment 2 Jürg Billeter 2008-01-17 15:38:16 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


*** This bug has been marked as a duplicate of 473804 ***