Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Config-Model-TkUi CPAN distribution.

Report information
The Basics
Id: 49999
Status: resolved
Priority: 0/
Queue: Config-Model-TkUi

People
Owner: DDUMONT [...] cpan.org
Requestors: asb_ehb [...] yahoo.de
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Here is an example script demonstrating Config::Model. It displays the gui and provides a configuration value, the user can modify. It should be added in the examples section of the Config::Model::TkUI manpage. ATM, there is no sub for writing the config. Note that there are warnings when pushing around with the buttons in the edit dialog: Use of uninitialized value in scalar chomp at C:/Perl/ site/lib/Config/Model/Tk/LeafEditor.pm line 181. Use of uninitialized value in concatenation (.) or string at C:/Perl/ site/lib/Config/Model/Tk/LeafEditor.pm line 183. HTH, Alex
Subject: model.pl
#!/Perl/bin/perl use strict; use warnings; use Config::Model; use Config::Model::TkUI; use Log::Log4perl qw(:easy); use FindBin qw/$Bin/; # -- init trace Log::Log4perl->easy_init($WARN); # -- create configuration instance my $model = Config::Model->new(); # -- create config model $model->create_config_class( name => "SomeRootClass", element => [ country => { type => 'leaf', value_type => 'enum', choice => [qw/France US/] }, ], ); my $inst = $model->instance( root_dir => $Bin, root_class_name => 'SomeRootClass', instance_name => 'test' ); my $root = $inst->config_root(); # -- Tk part my $mw = MainWindow->new(); $mw->withdraw(); $mw->ConfigModelUI(-root => $root); $mw->MainLoop();
Since your example calls Tk graphical interface, I've re-assigned this RT to config-model-tkui. I've added your example (with some clean-up) to Config-Model-TkUI. ( http://config-model.svn.sourceforge.net/viewvc/config-model/trunk/config-model-tk-ui/examples/model.pl?view=markup ) I've also fixed the few warnings you've seen. All of this will be part of the next release. Many thanks.
This ticket was fixed in Config::Model::TkUI 1.302 (back in September 2009). I just forgot to update this tracker (oops) All the best