Gtk2-Ex-DbLinker-DbTools
view release on metacpan or search on metacpan
lib/Gtk2/Ex/DbLinker/AbForm.pm view on Meta::CPAN
package Gtk2::Ex::DbLinker::AbForm;
use Class::InsideOut qw(public private register id);
use Gtk2::Ex::DbLinker::DbTools;
use Scalar::Util qw(weaken);
use Log::Any;
#use Carp 'croak';
our $VERSION = $Gtk2::Ex::DbLinker::DbTools::VERSION;
=head1 NAME
Gtk2::Ex::DbLinker::AbForm - Common methods for Gtk2::Ex::DbLinker::Form and Wx::Perl::DbLinker::Wxform
=head1 SYNOPSIS
See L<Gtk2::Ex::DbLinker::Form> and L<Wx::Perl::DbLinker::Wxform>. The methods in this module are not supposed to be called directly. But they are commented here.
lib/Gtk2/Ex/DbLinker/AbForm.pm view on Meta::CPAN
private widgets => my %widgets;
my @arg_names;
sub new {
my $class = shift;
my $self = \( my $scalar );
bless $self, $class;
register $self;
weaken $self;
my $id = id $self;
my @arg = @_;
my $def = {};
my $arg_value_ref = { ( %$def, @arg ) };
my $arg_holder_ref = {
childclass=> \%child_class,
data_manager=> \%dman,
datawidgets => \$widgets{ $id}->{cols},
datawidgets_ro => \$widgets{ $id}->{datawidgets_ro},
lib/Gtk2/Ex/DbLinker/AbForm.pm view on Meta::CPAN
sub add_childform {
my ( $self, $sf ) = @_;
my $id = id $self;
$log{ $id }->warn(
"add_childform : do not set auto_apply to 0 if you call this method")
unless ( $states{ $id }->{auto_apply} );
#carp("add_childform : do not set auto_apply to 0 if you call this method") unless ($self->{auto_apply});
push @{ $widgets{ $id }->{subform} }, $sf;
weaken @{ $widgets{ $id }->{subform} }[-1];
}
sub _init {
my $self = shift;
my $id = id $self;
if ( defined $widgets{ $id }->{datawidgets_ro} ) {
my %seen;
%seen = map { $_ => $seen{$_}++ }
( run in 0.312 second using v1.01-cache-2.11-cpan-1f129e94a17 )