Re: defaulting to new_with_mnemonic sucks



Guillaume Cottenceau said:
Hi,

As some of you know, we use a lot perl-Gtk2 in mandrake tools.
Our experience of the ->new methods with one parameter mapped to
"new_with_mnemonic" (rather than "new_with_label") is that it
*always* triggers bugs, and *never* helps. For example, package
names containing '_' or mount points, etc. Is there many people
with a different experience? Could we maybe have a global switch?
(but this would be dirty probable..)

the new_with_label variants are always available and in such cases should be
used for clarities sake anyway. the new('string') is just a convince. if you
want something particular to happen there's nothing keeping you from using the
new_with_label('string') or new_with_mnemonic('string') for that matter.

the question was asked long long ago (when gtk2-perl-xs was first being worked
on) and the list didn't raise objections and/or thought it was a good idea.

mainly it was to encourage the use of mnemonics and it didn't in any way
prevent you from doing anything you could of otherwise. the overloaded new's
have a well defined, documented and adhered to behavior, that doesn't suck.

-rm



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