Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Say I have a Gtk2 application with a list that contains text columns, implemented by CellRendererTexts. There is a complete working example in Lists in Gtk2 example.

This example (and all others on the web) connect the 'edited' signal to a function that writes back the value into the model. There is one problem with this approach: the 'edited' signal does not always fire. This can be seen in the program in the linked node: when you start editing a text cell, then immediately click on one of the buttons, your modifications will be discarded - which is very annoying, especially, as in my application, the list is part of a dialog box and the button is the OK button of that dialog. I and the end user both would expect that clicking OK would acknowledge and save any modifications, and having to remember to click outside the cell but inside the list before clicking ok is extremely frustrating.

I see that Gtk2::CellRenderer can also emit an editing-changed signal, which does seem to be fired even edited is not - but the editing-changed signal does not get the row and the edited text as parameters, and I don't see where else would I get these.

So: how to do it properly?


In reply to Gtk2 CellRendererText: how to save the edited value in the cell? by kikuchiyo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (5)
    As of 2017-12-16 17:26 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      What programming language do you hate the most?




















      Results (457 votes). Check out past polls.

      Notices?