Note that there are some explanatory texts on larger screens.

plurals
  1. POScala: Button in Table Cell does not "fire" Action
    text
    copied!<p>I've got a little Problem: I want to have <code>Buttons</code> in some of the cells of my <code>Table</code>. As rendering component I return a <code>Button</code> with the following code: (theres application specific and debugging code in this example but you'll get the picture)</p> <pre><code>class LivingTreeButton(lt:LivingTree[_], client:TableBehaviourClient) extends Button(Action("xx") { println("fire!") lt.expanded = !lt.expanded client.refresh }){ println("I print therefore I am") } </code></pre> <p>now when I scroll to one of the <code>Buttons</code> in the <code>Table</code> I see the "I print therefore I am" printouts and I do see the buttons with the "xx" text. But when I press one of the buttons nothing happens and I don't even see the "fire!" printouts.</p> <p>It doesn't work neither, when I define the <code>Action</code> in the <code>Buttons</code> body instead of the constructor.</p> <p>As further background info: I'm not blocking the tables <code>Events</code> or anything. I only have a to listeners set up in <code>JTable</code> </p> <pre><code> peer.getColumnModel().addColumnModelListener(behaviourWorker) peer.getTableHeader().addMouseListener(behaviourWorker) </code></pre> <p>and only temporarily block one of my own events in the <code>Tables</code> subclass:</p> <pre><code>listenTo(this.selection) reactions += { case e@TableRowsSelected(_,_,true) =&gt; if(!blockSelectionEvents) publish(PimpedTableSelectionEvent(this)) } </code></pre> <p>has any of you ever struggled with the same problem or has any idea what might be going wrong. After 2 hours od resultless debugging I would be thankfull for ANY hint.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload