ENUM syntax



Greetings,

        I've noticed a change of style between Gtk.pm and Gtk2.pm in the
way that you are able to specify ENUMS.  You can specify ENUMS in Gtk.pm
using the '-' notation (for want of a better description.

        ... and yes this is allowed in 'use 'strict''. :-)

Example:

my $window = new Gtk::Window(-toplevel); # Valid.
$table1->attach($window, 0, 1, 0, 1, [-fill,-expand], [-shrink], 1, 1); # Valid.

but...

my $window = new Gtk2::Window(-toplevel);# Invalid.
$table2->attach($window, 0, 1, 0, 1, [-fill,-expand], [-shrink], 1, 1); # Invalid.

Could I request we re-instate this notation please :-)

All that needs be done is to include aliases/[insert your implementation method
here] for all enums for example '-toplevel' to be equal to 'toplevel'.

Its a style issue more than a design issue, but if you don't ask you don't get :-)

Regards,


Red




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