Re: hy;hen/underscore equivalence in signal names?

Boncek, John wrote:
I typed an underscore instead of a hyphen by mistake in a GtkEntry signal
name, "insert_text" instead of "insert-text", at one of 2 places the name
was used.  It worked.  I inverted both of them and it still worked.
Apparently these are interchangeable, at least in this one instance, in
GTK 2.2.4.

They are interchangeable, with the only requirement that you stick to
either of them in every string.  I.e. you can use "my-long-signal-name"
or "my_long_signal_name", but not "my_long-signal_name".  I'm not sure
why GLib people chose it to be this way, but I appreciate it, because
hyphens are my second best word separator after spaces :)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]