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

I've made a TixGrid containing Text as well as some buttons.

I want to refresh it.So i use unset on each cell or delteColumns($_) foreach 0..10 to be able to delete all the content from the TixGrid.

The problem is, that when I fill the table again with the same data , the script crashes.

I have tried to isolate the problem , but I wasn't able to. The crash differs from one run to another run.

I am pretty sure Tk does something wrong,because I get SEGFAULT.

I need to know how to properly clean up a TixGrid ?

Replies are listed 'Best First'.
Re: Tk TixGrid Refresh crash
by zentara (Cardinal) on Aug 23, 2007 at 15:36 UTC
    When you first asked the earlier question about a -window itemtype in a TixGrid, I somehow knew that a problem was coming. :-) I got that weird tingle up my spine.

    The TixGrid widget is considered somewhat experimental, so you probably should switch to a more widely used and tested widget, like maybe Tk::TableMatrix.

    From the perldoc for Tk::TixGrid

    <quote> The port of Tix C code and some of the bindings to perl/Tk is done but still need further work. In several places the intent of the Tix code is not yet understood. For example the ’edit’ interface is clearly intended for spread‐sheet like cell content editing in an auxillary "entry" widget or similar, but how that should work is not yet clear. </quote>


    I'm not really a human, but I play one on earth. Cogito ergo sum a bum

      Hi ! Thank you for your recommendation. I have taken it into consideration and am working towards modifing my code from TixGrid to Tk::TableMatrix.

      However,I have some weird problems using it , I have described here http://perlmonks.org/?node_id=634823

Re: Tk TixGrid Refresh crash
by vkon (Curate) on Aug 24, 2007 at 05:58 UTC
    Tix widgets library are considered obsolete within Tcl/Tk experts, who use other better maintainable widgets, like tkTable or many other.

    These are not available from perl/Tk, but are available in Tcl/Tk, which is even better approach with Tcl::Tk CPAN module

      i could not understand the tixgrid widget used in perl tk. If anyone knows it well then please let me know. send me a working example of tixgrid having all functionality with some necessary comments. send this file to vikki_mittal2001@yahoo.com I need it very urgently. help done will be appreciable. thank you....