cormanaz has asked for the wisdom of the Perl Monks concerning the following question:

I've got several Perl databases (created with MLDBM "DB_File") with slightly different record structures that I'd like to view. So I want to make a gui-based application that would allow me to open the DB, select a record, and view the contents of the record in an expandable list structure (i.e. like you get with Komodo debug variables view, or with windoze explorer when looking at directory trees, etc. ). In other words, it would perform a simular function to module Data::Dumper, only record by record and in a gui with the expandable list.

I've done some elementary Win32::GUI stuff so I can handle the select records part. But I'm not sure how to set up that expandable list structure, or how to populate it with data from an unknown record structure.

Super Search didn't turn up much help. Does anyone have advice for how to approach this task? Have a code sample that would help, maybe? tia...Steve

Replies are listed 'Best First'.
Re: Making GUI to view db records
by jplindstrom (Monsignor) on Jul 07, 2004 at 20:24 UTC
    Perl Oasis uses a Win32::GUI::TreeView to dynamically display a directory tree. It sounds like what you want. Screenshot of the TreeView (in the left pane).

    You add nodes to the tree with the InsertItem() method, possibly providing a parent node.

    Or did you really want to know how to manage and set up the tree data structure?

    /J

Re: Making GUI to view db records
by dragonchild (Archbishop) on Jul 07, 2004 at 15:32 UTC
    Port to MySQL and use the many excellent MySQL viewers that are out there. Or, port to Access / SQL*Server and use Microsoft's tools. MLDBM DB_File isn't meant for what you're trying to do.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

    I shouldn't have to say this, but any code, unless otherwise stated, is untested