in reply to Tk::DBI::Table problem, is it me or a bug??

Indeed that module is too buggy yet.

As RTFSing shows, code inserts an element into HList and "item path" equals to first field, but rather should be incremented.

What if you'll try displaying rows where first column is different in each row? Are things any different?

If yes, then I'll advice you to change that module to autoincrement first column starting from, say, "00000".
Otherwise currently I'm out of advices, but feel free to ask further :)

Courage, the Cowardly Dog

  • Comment on Re: Tk::DBI::Table problem, is it me or a bug??

Replies are listed 'Best First'.
Re: Re: Tk::DBI::Table problem, is it me or a bug??
by jdtoronto (Prior) on Aug 07, 2003 at 12:45 UTC
    Thanks Courage

    I assume that RTFSing is reading the f... Source. If that is true then I have to admit that is something I did not do. I got this back from the developer, confirming what you said:

    Good Morning John, you need a first field with a unique content to adress a row for the c +ommand callback. Ok, here a little trick: sub doDBItable { my $top = MainWindow->new; my $tkdbi = $top->DBITable ( -sql => 'select CONCAT(name,pseudonym,age),* from user', -dbh => $dbh, -display_id => 0, # --- dont display the merged id! -debug => 1,)->pack(expand => 1, -fill => 'both'); } I hope this helps.
    I then modified my sql to include the 'id' which is a unique autoincremented value - it worked. It might be buggy, but heck, if I can use this module then it will really save my bacon on a Windows job I have in hand right now.

    Thanks for your help, I will go and look at the source when this job is out of the way.

    ...john

      Polite people spell RTFS as "Read This *Fine* Sources".

      At least it is how I spell it for me once I saw this somewhere on www.perl.org site...
      :)

      Courage, the Cowardly Dog

        This should help:

        Change

                   -sql => 'select * from user', into

                   -sql => 'select rowid,* from user',

        depending on your DB ofcourse...