Creating a Cell Editor for a JTree

Hi...
I would like to be able to edit the nodes of a JTree dynamically, but I'm not sure how to do it. I have unsuccessfully tried to implement a celleditor by extended the DefaultTreeCellEditor. The editing works fine, but once the cell has been edited, I get a ClassCastException.
I know that I need to get the edited value and then make appropriate changes to the DefaultMutableTreeNode object stored, but I am not sure where to do all this. I would really appreciate some tips on where to get the edited value entered, and how I can access the object being edited. Thanks.
..VJ..

So, you have a big table whose cells each contain a little table. I assume you already have the little tables working correctly with cell editors and so on, and you want to write a cell editor for the big table. Correct?
My problem with this is that I can't imagine how this would actually work in practice. Suppose I click on a cell in the big table; then the cell renderer displays the appropriate little table. At this point should I see one of the cells in that little table selected, and should I be able to use the Tab key to move around the little table? And if so, then I can't use the Tab key to move around the big table. Next, suppose I press F2 indicating that I want to edit the little table. What should change? Should I now be able to tab around the little table, whereas I couldn't before? And if so, how do I indicate that I have stopped editing the little table? Pressing Enter indicates to the little table's cell editor that its editing is finished, but how should I tell the big table's cell editor that its editing is finished?
Perhaps if you can answer this, you may have a better idea of how to solve your problem. Sorry I only have questions and not answers.

Similar Messages

  • JTree: How to set different cell editor for different tree Nodes.

    I have a JTree and I want to set different cell editors for different node depending on some condition. E.g. I want to set ComboBox as editor for leaf node but each leaf node will have its own set of data.
    Any help or pointer?
    Thanks in advance
    Sachin

    take there:
    http://www.mutualinstrument.com/Easy/FAQ/Tree/tree.html

  • Setting cell editor for individual cell in JTable

    Hi there,
    I want to provide individual cell editor for my JTable. Basically, my JTable shows property names and values. I want to show different cell editors for different properties.
    I followed the advice in this post:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=423318
    but I have a question:
    I looked at the code of DefaultCellEditor. It just has a single editor component (the one provided in the constructor), so all the methods use the same component and certain aspects are customized for the type of component. Again, there can be only one type of component at a time.The problem that I am facing is that I will have different components for different row/column of the same table. So how do I implement some of the methods (for example, getCellEditorValue()), when I have multiple editor components?
    Also, how do I commit changes made by the user?
    I am extremely confused.
    Someone please help!
    Thanks.

    Actually, that's what I am currently doing.
    Here is my cell editor class:
    public class ObjectPropertyEditor extends DefaultCellEditor
           public ObjectPropertyEditor()
              super(new JTextField());
              Vector list = new Vector();
              list.add("Yes");
              list.add("No");
             myCombo = new JComboBox(list);
          public Component getTableCellEditorComponent(JTable table, Object value,
              boolean isSelected, int row, int column)
             String colName = (String)table.getValueAt(row,0);
             if(colName.equalsIgnoreCase("Leaf-Node?")) //if it is the "Leaf" property, return the combo box as the editor
                 return myCombo;
            else  //for all other properties, use JTextField of the super class
                return super.getTableCellEditorComponent(table,value,isSelected,row,column);
        private JComboBox myCombo;
    }The problem I have is that when I select a new item from the combo box, the new selection is not reflected in the tableModel. I don't know how I can achive that. I think I need the functionalities that DefaultCellEditor gives to its delegate when its constructor arguments is a combo box. But how can I get two different sets of functionalities (JTextField and JComboBox) ?
    Please help!
    Thanks.

  • Cell Editor for a JTable within A JTable Cell

    My individual cells each contain a seperate JTable and I need to write a cell editor for it. I'm not really sure how to write one so if someone show me where I can find some useful examples of such a cell editor I would greatly appreciate it. Thank you for your time. :-)

    So, you have a big table whose cells each contain a little table. I assume you already have the little tables working correctly with cell editors and so on, and you want to write a cell editor for the big table. Correct?
    My problem with this is that I can't imagine how this would actually work in practice. Suppose I click on a cell in the big table; then the cell renderer displays the appropriate little table. At this point should I see one of the cells in that little table selected, and should I be able to use the Tab key to move around the little table? And if so, then I can't use the Tab key to move around the big table. Next, suppose I press F2 indicating that I want to edit the little table. What should change? Should I now be able to tab around the little table, whereas I couldn't before? And if so, how do I indicate that I have stopped editing the little table? Pressing Enter indicates to the little table's cell editor that its editing is finished, but how should I tell the big table's cell editor that its editing is finished?
    Perhaps if you can answer this, you may have a better idea of how to solve your problem. Sorry I only have questions and not answers.

  • When do I need to use a cell editor in a JTree?

    I'm currently trying to add checkboxes to nodes in a JTree. I use a panel containing the check box and a label for rendering. I did this because I want only the checkbox to respond to a mouse click and not the text associated with it. I've read several articles online (including the tutorial) and seen sample code as well. Do I need a cell editor or just have a cell renderer with a mouse listener? I've seen it done both ways.

    Let me rephrase the question.
    If I want to display a checkbox and a label as a node in a Jtree, which way should this be done (with or without a cell editor)? What are the advantages/disadvantages to each approach and what is recommended by Sun?
    I ended up not using a cell editor, but I've read posts on various sites where it was stated that if the user has interaction with the node then an editor should be used (with no other explanation as to why). I guess my main concern is that there might be a down side from not using a cell editor that I'm not aware of.

  • List UIBB - Access to cell editor for a certain table line possible

    Hi,
    I am looking for a way to access the cell editor of the last table line as I want to mark it as a special - summary - line.
    I intend a similar approach like in WebDynrpo ABAP when accessing the node info and modifying the "CELL DESIGN" attribute like in the following code (copied from WD Comp WDR_TEST_TABLE, View CELL DESIGN, method FILL_CELL_DESIGNS) :
      data tab type IF_CELL_DESIGN=>Elements_Cell_Designs.
      data line type IF_CELL_DESIGN=>Element_Cell_Designs.
      data node_info type ref to if_wd_context_node_info.
      data attribute_info type wdr_context_attribute_info.
      data attr_value type WDR_CONTEXT_ATTR_VALUE.
      node_info = node->get_node_info( ).
      attribute_info = node_info->get_attribute( 'CELL_DESIGN' ).
      line-is_expanded = abap_true.
      line-is_leaf     = abap_false.
      line-key         = 'FIRST'.
      loop at attribute_info-value_set into attr_value.
        line-text = sy-tabix.
        concatenate 'Text #' line-text into line-text. "#EC NOTEXT
        line-cell_design = attr_value-value.
        insert line into table tab.
        line-is_leaf = abap_true.
        line-key = attr_value-value.
        line-parent_key = 'FIRST'.
      endloop.
      node->bind_table( tab ).
    I suspect the method IF_FPM_GUIBB_LISTGET_DATA (or IF_FPM_GUIBB_LISTGET_DEFINITION) of my feeder class to be the right access point.
    But unfortunately, I have not yet found out how to change the cell design for specific lines, only for whole columns.
    Can anyone give me a hint here?
    BTW: The "summary" line is not a sum of the lines above, but determined by backend logic, so not ALV-summary line for me.
    Kind Regards

    Hi,
    A short update for all interested:
    My current work around is to always set the lead selection to the summary line. It does in a kind "mark" that line as special as long as I cannot mark it using a different cell design.
    How do I assure this?
    I have implemented the following code in a redefinition of the method ADJUST_SELECTION:
    *- alter selection
      DATA:
       ls_size TYPE rstabix.
      "get index of summary line
      ls_size-tabix = mo_collection->size( ).
      "change only if there are any cash conc. proposals
      IF ls_size-tabix > 0.
        "do FPM selection
        CLEAR: ev_lead_index, et_selection.
        ev_lead_index = ls_size-tabix.
        APPEND ls_size TO et_selection.
        "do BOL selection
        mo_collection->if_bol_bo_col_multi_sel~unmark_all( ).
        mo_collection->if_bol_bo_col_multi_sel~mark( iv_index = ls_size-tabix ).
      ENDIF.
    The general downside is, that no other selection is possible!
    The selection is always reset to the summary line with each roundtrip.
    Waiting for a better solution...
    Kind Regards,
    Robert

  • JTable Cell Editor For Decimal Input

    Hi friends in my program i am using jtable, in that table two columns are decimal value. I am using defaultcelleditor for to check the user input but it does not work. so how can i check the user input, ie number or string using the cell editor. My aim is to check the user input, if the user give the wrong value, ie string input the warning message want to be displayed and the editor color also want to change. Please help me.
    I refer some tutorials and get some source code and i used but it does not work. this is the code.
    DecimalFormat format=new DecimalFormat("######0.00");
    tableField=new JFormattedTextField();
    tab_Bill.getColumnModel().getColumn(3).setCellRenderer(new DecimalRenderer(format)); tab_Bill.getColumnModel().getColumn(3).setCellEditor(new ProblemEditor(tableField));
    class DecimalRenderer extends DefaultTableCellRenderer {
      DecimalFormat formatter;
      DecimalRenderer(String pattern) {
        this(new DecimalFormat(pattern));
      DecimalRenderer(DecimalFormat formatter) {
        this.formatter = formatter;
        setHorizontalAlignment(JLabel.RIGHT);
        @Override
      public void setValue(Object value) {
       /* setText((value == null) ? "" : formatter.format(((Double) value)
            .doubleValue()));*/
    setText((value == null) ? "" : formatter.format(Double.parseDouble(value.toString())));      
         class ProblemEditor extends DefaultCellEditor implements TableCellEditor{
       private JFormattedTextField ftf;
       public ProblemEditor(JFormattedTextField myfield) {
           super(myfield);
            @Override
       public Component getTableCellEditorComponent(JTable table,
               Object value, boolean isSelected, int row, int column) {
           ftf = (JFormattedTextField) super.getTableCellEditorComponent(table, value, isSelected, row, column);
            Double d = null;
           try
                    if(value!=null)
            d=Double.parseDouble(value.toString());   
            catch(Exception e)
               // JOptionPane.showMessageDialog(null,"Wrong");
               d=0.0;
           ftf.setValue(d); // remove and okay
           ftf.setCaretPosition(ftf.getText().length());
           return ftf;
    }

    You might find it easer to use on of the [Table Format Renderers|http://www.camick.com/java/blog.html?name=table-format-renderers].

  • Info on cell editors for specific rows

    Hi all,
    Could anyone tell me how to return different components to be the editors for different rows in a table.
    I have certain rows that will use a checkbox editor and certain rows that will use a formatted textfield editor. I have coded an outline to my custom editor which extends Component and implements TableCellEditor. Any help would be greatly appreciated.
    Regards
    Alan

    Override getCellEditor() for the JTable
        public TableCellEditor getCellEditor(int row, int column) {
            if(row==rowOfmyChoice) //Or whatever Logic You want
                      return new MyCellEditor()
            return super.getCellEditor(row,column);
        }

  • Creating a custom editor for each cell in a Jtable

    camirk, i know its swing ;) so
    http://forum.java.sun.com/thread.jspa?threadID=652383
    im just posting this link here for people who dont read the swing forum but are looking for the same solution
    hope it helps someone :)

    Two days after you posting you original question: http://forum.java.sun.com/thread.jspa?threadID=651625&messageID=3831712
    you find the answer on your own. Yes, the general Java forum sure is helpfull.
    If the question was posted in the Swing forum you would have had the answer in a couple of hours:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=637581

  • How to create a context menu in ALV table cell editor(Webdynpro abap )

    Hello Experts,
    I am having a problem in creating a context menu in a table cell editor in the ALV table output.I have assigned a 'lta' as the cell editor.But befor assigning the lta as cell editor I have assigned the menu to the lta.But when the view is rendered I can see the lta with the actioned assigned to it.But I cannot see the context menu.
    The code snippet below:
      "Create menu for each coloumn
      create OBJECT lo_menu_actions type CL_SALV_WD_VE_MENU EXPORTING
          id = 'MITM_ACTIONS'.
      lo_menu_actions->set_visible( value = abap_true ). 
      lo_menu_actions->set_visible_fieldname( value = 'ACTIONS' ).
      "ADd menu items
      CREATE OBJECT lo_menu_item_create type CL_SALV_WD_VE_MENU
      exporting
        id = 'MITM_CREATE_EXPRESSION'.
      lo_menu_item_create->set_visible( value = abap_true ).
      lo_menu_item_create->set_visible_fieldname( value = 'Create' ).
      "Add item 1
      lo_menu_actions->ADD_ITEM( VALUE = lo_menu_item_create ). 
      "  Set the cell editor for each column cell(link to an action)
      LOOP AT lt_node_dec_tab_cols INTO ls_node_dec_tab_cols .
        lv_column_name = ls_node_dec_tab_cols-object_name.
        lr_column = lr_column_settings->get_column( lv_column_name ).
       "Create 'lta' Ui item
        CREATE OBJECT lo_lta TYPE cl_salv_wd_uie_link_to_action.
        lo_lta->set_menu( value = lo_menu_actions ).
        lo_lta->set_text_fieldname( lv_column_name ).
        lr_column->set_cell_editor( lo_lta ).
        IF ls_node_dec_tab_cols-is_result EQ abap_true.
          lr_column->set_cell_design( value =
                      cl_wd_table_column=>e_cell_design-key_medium ).
        ENDIF.
      ENDLOOP.

    Hi Prakash,
    I have not come across this requirement till now to have context menu in a cell editor of alv.
    Unfortunately  the implementation of method SET_MENU of alv ui elements ( ex: cl_salv_wd_uie_text_view ) is not updating alv configurable table, instead it just stores in a global attribute as string. Hence has no effect on context menu.
    If your user is very particular about this requirement of having context menu in cell editor, you can go for a normal table. Because, normal table's cell editor has the property to set the menuID as we do it for other ui elements.
    Regards,
    Rama

  • How to use the cell editor in FICO reports for YTD

    HI experts,
    I am working with BI7.0, in the below report, i have displayed result based on user input.but how to calculate the YTD values. User will give the input like 072007, results will be display one year from 072007 to 062006 (one yearback) and one more column is YTD
    Report structure is :
         user input(single value): 072007
              AUG06....JAN07....JULY07....YTD
    KEYFIGURE-1        453      -
    777     -
       232       -
      777 (Only Jan07 value of Keyfigure-1)   
    KEYFIGURE-2        879      -
    233        -
    123       -
      ???? (only sum from Jan07 to July07)
    KEYFIGURE-3        212            -
    879      -
    989                -
    KEYFIGURE-4        234            -
    656      -
    788                   -
    KEYFIGURE-5        345            -
    878      -
    878                 -
    KEYFIGURE-6        767            -
    767       -
    323                 -
    KEYFIGURE-7        879            -
    878     -
    999                -
    999 (Only last value of keyfigure-7 (July07)
    in the above report, total 7 keyfigures so 7rows of YTD column
    1) in the first YTD column, how will display only one value (keyfigure-1) of Jan07?
    2) in the last YTD Column, how will display only one value (keyfigure-7) of July07?
    3) from 2 to 6 columns of YTD, how will display the sum from Jan07 to July07?
    Note: months will be changed based on user input(single Value)
    how can use cell editor for above the senior.
    if any option is availabel please let me know
    Thanks
    kishore

    I think the following should work:
    Context:
    Rows (node,c=0:n)
    --- rowIndex (integer)
    selectedRowIndex (integer)
    Bind the "selectedKey" property of the radio button (cell editor) to attribute "selectedRowIndex" (outside table data source node) and bind "keyToSelect" to attribute "Rows.rowIndex". Make sure that the "rowIndex" attribute will contain the index of the node element in node "Rows".
    Armin

  • Setting value in a cell in JTable where editor for cell is a JComboBox

    Hi,
    I have a column in a JTable where it holds a comboBox . As the comboBox has different
    values depending on the row I've a cell editor for each row. That's fine. My problem is that one of the
    values on the comboBox launches a dialog where the user selects a new value to add to the comboBox.
    The comboBox gets updated with this new value and I call setValueAt on the table. Both get updated
    but the cell doesn't display the new value added in the JTable. I click it and the comboBox has the
    value and I've to select it to get it displayed in the cell.
    Here's the code for updating the tableModel -
    public void updateCellDetails(String value, int row)
    JComboBox combo = (JComboBox) rowEditor.getTableCellEditorComponent(
                        this,
                        value,
                        true,
                        row,
                        4);
    if (combo != null)
    combo.insertItemAt(value, combo.getItemCount() - 1);
    combo.setSelectedItem(value);
    rowEditor.setEditorAt(row, new DefaultCellEditor(combo));
    MyTableModel tableModel = (MyTableModel) getModel();
    tableModel.setValueAt(value, row, 4);
    Thanks

    Not sure if this'll help, but did you ever fire an editing-stopped event? If such an event is never fired, then editing-cancelled will be fired when you lose focus from the editor and the original value will be restored.

  • Dynamically change the cell editor in the table control

    Hi..
         I have 3 columns in a table . of which in one column we need to change the cell editor dynamically at runtime.
    i.e for example i have  columns as carrid, connid and fldate.
    For the first 2 rows the cell editor for the carrid  clomn shud be a dropdown and from there on in the next rows for the same  carrid column it shud be a input field.
    Can experts plz help me how to achieve this as this is very high priority issue....
    Regards,
    Madhu...

    This is actaully fairly simple to do.  You will need to add a cellVariant to your table column. You can then dataBind a context attribute to the selectedCellVariant property of the column to control which cellVariant will be used. This allows you to control row-by-row which cell editor you want to output.
    http://help.sap.com/saphelp_nw70/helpdata/EN/bd/5d9041d3c72e7be10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/56/5e9041d3c72e7be10000000a1550b0/frameset.htm
    Also here is an example that I did the other day that uses Cell Variants within ALV.  This process is actually a little more complicated because you have to go through the ALV APIs.  To do this in a normal table is actually easier because you can create the cellVariant in the layout designer.
    Re: Freely-programmed value help for a single ALV cell

  • Table Cell Editor (Urgent)

    I would like to know if it is possible to set different cell editor for each cells within the same column.
    I want to have Combo boxes with different items for several cells within the same column.
    Plz tell me how to do so if this is possible
    Thanks,
    MetaLik

    You could create you own custom editor.
    class MultiCellEditor extends JComponent {
    JComponent currentComp;
    JTextField f = new JTextField();
    JComboBox c = new JComboBox();
    public void setComponent(JComponent comp) {
    public JComponent getComponent() {
    public Object getCellEditorValue() {
    if( currentComp instanceof JTextField ) {
    return ((JTextField)currentComp).getText();
    }else if( currentComp instanceof JComboBox ) {
    return ((JComboBox)currentComp).getSelectedItem();
    return null;
    public Component getTableCellEditorComponent(JTable table, Object value,
    boolean isSelected,
    int row, int column) {
    if (row == 1 && col==2) {
    setCurrentComponent(textField);
    } else if(....) {
    return currentComponent;
    So what your editor does is gives the current component based on row and column and will have to populate the items correspondingly.

  • JTable cell editor not working

    Hello there,
    I am new to Java programming,
    I am trying to create a check box in a table cell which the user should able manipulate when the JTable is showing, the renderer is working fine but the editor is not , the overriden method getTableCellEditorComponent never gets a call, getTableCellRendererComponent does get a call and renderer works fine.
    any ideas whats wrong here ?? or what could be wrong which makes getTableCellEditorComponent not get called ?
    my renderere and editor code is like this
    package com.itrsgroup.swing.componentmanager.dockablemanager;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Font;
    import java.awt.event.ItemEvent;
    import java.awt.event.ItemListener;
    import java.util.EventObject;
    import javax.swing.AbstractCellEditor;
    import javax.swing.JCheckBox;
    import javax.swing.JTable;
    import javax.swing.SwingConstants;
    import javax.swing.UIManager;
    import javax.swing.table.TableCellEditor;
    import javax.swing.table.TableCellRenderer;
    * A cell renderer and a cell editor for rendering and editing the filters active state.
    public class ActiveCheckBoxRendererEditor extends AbstractCellEditor
    implements TableCellEditor, TableCellRenderer, ItemListener
    private Font font = new Font("Verdana", Font.BOLD, 11 );
    private JCheckBox editor = new JCheckBox("Inactive");
    private JCheckBox renderer = new JCheckBox("Inactive");
    private String strSelectedText;
    private String strNotSelectedText;
    private Color colourActive = new Color(51,153,51);
    private Color colourInActive = Color.RED;
    /** Constructor. */
    public ActiveCheckBoxRendererEditor()
    this( "Selected", "Not Selected" );
    * Constructor.
    * @param strSelText - the text to render when selected.
    * @param strNotSelText - the text to render when not selected.
    public ActiveCheckBoxRendererEditor(String strSelText, String strNotSelText)
    strSelectedText = strSelText;
    strNotSelectedText = strNotSelText;
    renderer = new JCheckBox( strNotSelectedText );
    renderer.setHorizontalTextPosition( SwingConstants.CENTER );
    renderer.setVerticalTextPosition( SwingConstants.TOP);
    renderer.setHorizontalAlignment( SwingConstants.CENTER );
    renderer.setVerticalAlignment( SwingConstants.CENTER );
    renderer.setFont( font );
    editor = new JCheckBox( strNotSelectedText );
    editor.setBackground( UIManager.getColor("Table.selectionBackground") );
    editor.setHorizontalTextPosition( SwingConstants.CENTER );
    editor.setVerticalTextPosition( SwingConstants.TOP );
    editor.setHorizontalAlignment( SwingConstants.CENTER );
    editor.setVerticalAlignment( SwingConstants.CENTER );
    editor.setFont( font );
    editor.addItemListener( this );
    @Override
    public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
    return editor;
    @Override
    public boolean isCellEditable(EventObject arg0)
    // TODO Auto-generated method stub
    return true;
    @Override
    public Object getCellEditorValue()
    return editor.isSelected();
    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
    Boolean bool = (Boolean) value;
    renderer.setSelected( bool );
    renderer.setText( bool ? strSelectedText : strNotSelectedText);
    renderer.setForeground( bool ? colourActive : colourInActive );
    if( isSelected )
    renderer.setBackground( table.getSelectionBackground() );
    else
    renderer.setBackground( table.getBackground() );
    return renderer;
    @Override
    public void itemStateChanged(ItemEvent e)
    boolean isSelected = e.getStateChange() == ItemEvent.SELECTED;
    editor.setText( isSelected ? strSelectedText : strNotSelectedText);
    stopCellEditing();
    and this is how I install it on my JTable
    ActiveCheckBoxRendererEditor cbc = new ActiveCheckBoxRendererEditor("Active", "Inactive");
    TableColumn
    activeColumn = this.getColumnModel().getColumn( 3 );
    activeColumn.setCellEditor( cbc);
    activeColumn.setCellRenderer( cbc );
    activeColumn.setPreferredWidth( 80 );
    activeColumn.setMaxWidth( 200 );
    activeColumn.setMinWidth( 80 );thanks
    Ahmed

    Is the column editable?
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.

Maybe you are looking for

  • Mac mini slow/page outs

    My late 2009 has been giving me fits for months and I can't seem to troubleshoot the problem. Things overall are slow but the main problem is Safari, Mail and waking the computer up from sleep. Here are the basic issues... 1. Safari hangs constantly

  • IQ846 Memory Dump/BSOD

    While using Windows Media Center with Live TV, whether it is Windows Vista, Windows 7 or Windows 8, the application locks up my system after ~20-~30 minutes, with a weird noise from the speakers, and then the BSOD shows up with a mememory dump.  Then

  • HT201272 1st generation ipod purchased music lost in new update

    I have a 1st generation Ipod, and when I downloaded the newest update all my music was lost from previous purchases on my 1st generation ipod, plus all the Cds i downloaded as well. How do I get my Itunes purchased songs back. As the older music does

  • Can I wirelessly ptrint from mobile devices on a j4 680series

    I am trying to wirelessly print ansd the person at best but tells me i need a new e print function. I have also been told that I need to just install a new software for it to work does anyone know ?

  • Effect error, Is there a fix for this?

    Hi, I have recently been having a lot of Problems with After Effects CC, but now I have come across another one, When I try to add the "Ramp" effect (AE Default) this error appears: I was wondering if there was a fix for this as this happens with man