The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Wx::Perl::DbLinker - Wx gui building part of DbLinker.

VERSION

version 0.001 but see version at the end of MYMETA.yml to check that I'm correct here...

INSTALLATION

To install this module type the following: perl Makefile.PL make make test make install

On windows use nmake or dmake instead of make.

DEPENDENCIES

The following modules are required in order to use Wx::Perl::Linker

        Gtk2::Ex::DbLinker::DbTools => 0.1,
        Data::Dumper => 2.154,
        DateTime::Format::Strptime => 1.5,
        Test::More => 1,
        Wx => 0.99,
        Log::Log4perl => 1.41

Install one of Rose::DB::Object or DBIx::Class if you want to use these orm to access your data.

DBIx::Class is required to get example_dbc working.

DESCRIPTION

This module automates the process of tying data from a database to widgets on a xrc-generated form.

Steps for use:

  • Create a Gtk2::Ex::DbLinker::xxxDataManager object that contains the rows to display. Use DbiDataManager, RdbDataManager or DbcDataManager depending on how you access the database: sql commands and DBI, DBIx::Class or Rose::DB::Object

  • Create xrc resource files to construct the gui: Wx windows and controls. It is required is that you name your widgets the same as the fields in your data source.

  • Create a Wx::Perl:DbLinker::Wxform object that links the data and the gui

  • Connect the buttons to methods that handle common actions such as inserting, moving, deleting, etc.

EXAMPLE

The eg folder (located in the Wx-Perl-DbLinker-xxx folder under cpan/build in your perl folders tree) contains one example that use a sqlite database of three tables:

  • countries (countryid, country, mainlangid),

  • langues (langid, langue),

  • speaks (langid, countryid) file ./data/ex1_1

  • runeexample_dbc.pl gives a main form with a bottom navigation bar that displays each record (a country and its main language) one by one.

    A subform displays other(s) language(s) spoken in that country. Each language is displayed one by one and a second navigation bar is used to show these in turn.

    For each language, a list gives the others countries where this idiom is spoken. Items from this lists are also add/delete/changed with a third navigation bar.

  • runeexample_dbc.pl uses DBIx::Class. The speaks table primary key is the complete row itself, with the two fields, countryid and langid.

SUPPORT

Any Wx::Perl::DbLinker questions or problems can be posted to me (rappazf) on my gmail account.

The current state of the source can be extract using Mercurial from http://sourceforge.net/projects/wx-perl-dblinker/.

AUTHOR

    FranE<ccedil>ois Rappaz <rappazf@gmail.com>
    CPAN ID: RAPPAZF

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

Gtk2::Ex::DbLinker::DbTools