FocusLost event/navigatedOutColumn to non-DACF controls

In the textAreaControl source I see:
// Focus Listener implementation
* This method is an implementaion side effect
public void focusLost(FocusEvent event)
When I do a focus lost event off the property panel in Designer... and add code to simply do a System.out.println("Focus Lost") on the control... nothing happens when I move to another control and the textareacontrol lost focus.
The correct approach seems to be use the NavigatedOutColumn event which does fire. ( hurrah! )...
BUT.... as I had a suspicion... if I enter into a DACF control, and then click in a NON-DACF control ( in this case, a secondary plain jtextfield password confirmation field )... neither FocusLost nor NavigatedOutColumn fires.
It sorta makes sense, because we haven't navigated into a new Column. ( Is this a terminology conflict/level mix problem? It seems to be relating Column to a rowSetInfo AttributeInfo / EO/VO attribute?
Note that, at least in my case, there are PLENTY of non DACF controls. Particularly JButtons.
As mentioned before, I avoided ButtonControls because I had no DataItemName to associate with 'em... which seemed to cause grief in other places ( in my memory using 3.O ). I actually went back and changed all the ButtonControls I had to JButtons.
This puts me into a rather interesting quandary... or is it safe in 3.2/JRE1.3 to use ButtonControls with no property set for the DataItemName()?
TIA

You are being tripped up by two things. One is a bug and the other is a difference between the 3.2 and 9i (aka 5.0) versions of the NavigationManager. The ComponentNavigationMonitor is OK though. Both of these can be worked around using the ComponentNavigationManager though the resultant code will not be compatible with the code released in the next version of JDeveloper. The solution is to rewrite the focusGained() method and write the new method _applyEdits(). The rewritten and new methods are below in a new version of the class. Notice the package name change; it is now in a new package called oracle.dacf.unsupported. This way, you can just change the package name when the next version is released:
<code>
// oracle/dacf/unsupported/ComponentNavigationMonitor.java
// Oracle JDeveloper
// Copyright (c) 2001 by Oracle Corporation
// All rights reserved.
package oracle.dacf.unsupported;
// imports
import java.awt.Component;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import javax.swing.SwingUtilities;
import oracle.dacf.control.ApplyEditsListener;
import oracle.dacf.control.ApplyEditsValidationException;
import oracle.dacf.control.Control;
import oracle.dacf.control.NavigationManager;
** The ComponentNavigationMonitor allows a Component, AWT or Swing,
** to be used in an application and still have the DAC navigation and
** validation event framework generate the proper events at the
** appropriate times. Normally, non-Control components can not
** participate in the DAC navigation and validation event framework
** because they don't have the mechanisms to notify the framework that
** the focus has moved.
** This class is implemented as a singleton and could be hooked into every
** non-Control Component that is displayed on the screen. It should not be
** attached to DAC Controls because these classes already contain the
** functionality contained in this class. Attaching this class to a DAC
** Control will minimally result in double navigation and validation
** eventing with the resultant performance degradation. Redundant
** navigation and validation could also result in anomalous application
** behavior.
** The DAC design-time and runtime framework does not automatically
** register non-Controls with the ComponentNavigationMonitor because of
** the ambiguity surrounding when this should be done. If the components
** are constructed using a Factory design pattern, then the factory would
** be the optimal place to attach this listener. If your application
** doesn't use this approach then you will have to individually hook each
** component. (Sorry, but there is no way around this fact.) You might
** try something like what the following code fragment illustrates in the
** method that instantiates the component:
** <blockquote>
** <code>
** TextField dateWidget =
** new TextField((new Date()).toLocaleString());
** ComponentNavigationMonitor.observe(dateWidget);
** </code>
** </blockquote>
** For example, if JDeveloper was used to generate code, via either the
** DAC wizards or the visual designer, then you would place this code in
** the jbInit() method of the panel or frame.
** @author Donald King
public class ComponentNavigationMonitor
extends FocusAdapter
private NavigationManager nm;
private static ComponentNavigationMonitor monitor;
private static Object observeGate = new Object();
private static final boolean _DEBUG = true;
private ComponentNavigationMonitor()
} // ComponentNavigationMonitor
** Responds to the gaining of focus by a component.
** This method is responsible for causing validation to be performed and
** restoring forcus to the proper control if validation fails.
public void focusGained(FocusEvent evt)
Control ctrl;
if (nm == null)
nm = NavigationManager.getNavigationManager();
ctrl = nm.getFocusedControl();
// the getChangeLevel() parameters are reversed to workaround
// bug 1678351; fixed for 9i (aka 5.0)
if (ctrl != null &&
!_applyEdits(ctrl) &&
!nm.validateFocusedControl(nm.getChangeLevel(null,ctrl)))
Component c = ctrl.getComponent();
// Paranoia is a good thing; the following is expensive, only do
// it if we must
if (c != null)
SwingUtilities.invokeLater(new DelayedFocus(c));
else
// move the NavigationManager into the proper state so that it
// can properly respond to the next control that gains focus
nm.validateFocusChange(null);
** This functionality is embedded in the 9i (aka 5.0) version of
** NavigationManager.validateFocusedControl(int changeLevel)
private boolean _applyEdits(Control ctrl)
boolean ok = true;
if (ctrl instanceof ApplyEditsListener)
try
((ApplyEditsListener)ctrl).applyEdits();
catch(ApplyEditsValidationException aeve)
ok = false;
return(ok);
** Registers the ComponentNavigationMonitor as a FocusListener.
public static void observe(Component c)
synchronized(observeGate)
if (monitor == null)
monitor = new ComponentNavigationMonitor();
c.addFocusListener(monitor);
** Unregisters the ComponentNavigationMonitor as a FocusListener.
public static void unobserve(Component c)
synchronized(observeGate)
if (monitor == null)
monitor = new ComponentNavigationMonitor();
c.removeFocusListener(monitor);
private class DelayedFocus
implements Runnable
private Component pending;
DelayedFocus(Component c)
pending = c;
public void run()
if (pending != null)
pending.requestFocus();
private void _debug(String s)
if (_DEBUG)
System.out.println("ComponentNavigationMonitor: " + s);
} // _debug
} // ComponentNavigationMonitor
// oracle/dacf/unsupported/ComponentNavigationMonitor.java
// Oracle JDeveloper
// Copyright (c) 2001 by Oracle Corporation
// All rights reserved.
</code>

Similar Messages

  • Extending dacf controls - Methods definition

    I need to extend a dacf control just in order to count the characters the user typed and assign a variable with this value.
    When the user types the first character I intercept the keyboard event and assign the variable; OK.
    Now I need to assign the initial value wich depends upon the length of the field in the DataBase.
    I tryed to fing the method the BC4J uses to assign the initial value to the field in order to redefine it for my purposes, but i didn't find it nor in the documentation nor looking to the class methods.
    Does anyone know what's the method used ?
    Or better, does anyone know how I can "see" in debugging all methods the system uses in an extended class ?
    TIA
    Tullio

    My problem is a little bit more complex.
    I don't need to know "how" I can find the dimension of the field, but "when" the system fills the field (wich method it uses).
    In general I need a more precise map of the methods the system uses in order to manage the control, so that I can redefine them.
    TIA
    Tullio

  • FocusLost event for JTextField sometimes triggered, sometimes not

    Some background.
    A column in a table consists of a number of cells.
    Each cell can be a JTextField or a JComboBox.
    I have written a CellEditor who returns either a JTextField or a JComboBox depending on some conditions.
    The JTextField listens for a FocusLost event to update the database.
    When I leave the first cell the FocusLost event is always triggered.
    For the ther cells the FocusLost event is triggeed every now and then.
    In the mean time I have found a simple workaround by placing the update code in method getCellEditorValue() which is called always by the table when moving to the next cell.
    I am just curious if someone has an explanation for this inconsistent behaviour of the FocusLost event.
    Code is below:
    * QuoteProductPropertyValueEditor.java
    * Created on May 4, 2005
    package tsquote.gui;
    * @author johnz
    import java.awt.Component;
    import java.util.EventObject;
    import java.awt.event.*;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.List;
    import java.util.Map;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import tsquote.controller.QueryHandler;
    import tsquote.exception.FinderException;
    import tsquote.gui.control.GenericTableModel;
    import tsquote.gui.control.Table;
    import tsquote.util.Messager;
    public class QuoteProductPropertyValueEditor implements TableCellEditor {
          * We use EvetListenerList, because it is thread-safe
         protected EventListenerList listenerList = new EventListenerList();
         protected ChangeEvent changeEvent = new ChangeEvent(this);
         private List<Component> componentList = new ArrayList();
         private Map<Integer, Integer> indexMap = new HashMap(); // maps row to index
         private Table table;
         private int currentRow;
         private QueryHandler queryHandler = QueryHandler.getInstance();
         public QuoteProductPropertyValueEditor() {
              super();
         public Object getCellEditorValue() {
              Component component = componentList.get(indexMap.get(currentRow));
              if (component instanceof JComboBox) {
                   JComboBox comboBox = (JComboBox) component;
                   return comboBox.getSelectedItem();
              JTextField textField = (JTextField) component;
              return textField.getText();
         public Component getTableCellEditorComponent(
                   JTable jTable,
                   Object value,
                   boolean isSelected,
                   int row,
                   int column) {
              final int thisRow = row;
              System.out.println("getTableCellEditorComponent(): thisRow=" + thisRow);
              table = (Table) jTable;
              currentRow = thisRow;
              if (!indexMap.containsKey(thisRow)) {
                   System.out.println("Control added: thisRow=" + thisRow);
                   indexMap.put(thisRow, componentList.size());
                   // This is actually a tsquote.gui.control.Table
                   GenericTableModel genericTableModel = table.getGenericTableModel();
                   List<Map> list = genericTableModel.getList();
                   Map recordMap = list.get(thisRow);
                   Boolean hasList = (Boolean) recordMap.get("product_property.has_list");
                   if (hasList) {
                        JComboBox comboBox = new JComboBox();
                        componentList.add(comboBox);
                        comboBox.addActionListener(new ActionListener() {
                             public void actionPerformed(ActionEvent event) {
                                  fireEditingStopped();
                        for (int i=0; i<=row +1; i++) {
                             comboBox.addItem("Item" + i);
                   } else {
                        JTextField textField = new JTextField();
                        componentList.add(textField);
                        textField.addFocusListener(new FocusAdapter() {
                             public void focusLost(FocusEvent e) {
                                  System.out.println("textField: thisRow=" + thisRow);
                                  JTextField textField = (JTextField) componentList.get(indexMap.get(thisRow));
                                  String newValue = textField.getText();
                                  fireEditingStopped();
                                  updateQuoteProductProperty(thisRow, newValue);
                        String text = (String) recordMap.get("quote_product_property.value");
                        textField.setText(text);
              Component component = componentList.get(indexMap.get(thisRow));
              if (component instanceof JComboBox) {
                   JComboBox comboBox = (JComboBox) component;
                   if (value == null) {
                        comboBox.setSelectedIndex(0);
                   } else {
                        comboBox.setSelectedItem(value);
              } else {
                   JTextField textField = (JTextField) component;
                   textField.setText((String) value);
              return component;
         private void updateQuoteProductProperty(
                   int row,
                   String newValue) {
              // Get PK quote_prodcut_property from list
              GenericTableModel genericTableModel = table.getGenericTableModel();
              List<Map> list = genericTableModel.getList();
              Map modelRecordMap = list.get(row);
              String storedValue = (String) modelRecordMap.get("quote_product_property.value");
              // If nothing changed, ready
    //          if (storedValue == null) {
    //               if (newValue == null) {
    //                    return;
    //          } else {
    //               if (storedValue.equals(newValue)){
    //                    return;
              // Update model
              modelRecordMap.put ("quote_product_property.value", newValue);
              Integer quoteProductPropertyID = (Integer) modelRecordMap.get("quote_product_property.quote_product_property_id");
              try {
                   queryHandler.setTable("quote_product_property");
                   queryHandler.setWhere("quote_product_property_id=?", quoteProductPropertyID);
                   Map recordMap = queryHandler.getMap();
                   recordMap.put("value", newValue);
                   recordMap.get("quote_product_property.value");
                   queryHandler.updateRecord("quote_product_property", "quote_product_property_id", recordMap);
              } catch (FinderException fE) {
                   Messager.warning("Cannot find record in quote_product_property\n" + fE.getMessage());
         public void addCellEditorListener(CellEditorListener listener) {
              listenerList.add(CellEditorListener.class, listener);
         public void removeCellEditorListener(CellEditorListener listener) {
              listenerList.remove(CellEditorListener.class, listener);
         public void cancelCellEditing() {
              fireEditingCanceled();
         public boolean stopCellEditing() {
              fireEditingStopped();
              return true;
         public boolean isCellEditable(EventObject event) {
              return true;
         public boolean shouldSelectCell(EventObject event) {
              return true;
         protected void fireEditingStopped() {
              CellEditorListener listener;
              Object[] listeners = listenerList.getListenerList();
              for (int i = 0; i < listeners.length; i++) {
                   if (listeners[i] == CellEditorListener.class) {
                        listener = (CellEditorListener) listeners[i + 1];
                        listener.editingStopped(changeEvent);
         protected void fireEditingCanceled() {
              CellEditorListener listener;
              Object[] listeners = listenerList.getListenerList();
              for (int i = 0; i < listeners.length; i++) {
                   if (listeners[i] == CellEditorListener.class) {
                        listener = (CellEditorListener) listeners[i + 1];
                        listener.editingCanceled(changeEvent);
    }

    The JTextField listens for a FocusLost event to update the database.I don't recommend using a FocusListener. Wouldn't you get a FocusLost event even if the user cancels any changes made to the cell?
    Whenver I want to know if data has changed in the table I use a TableModelListener:
    http://forum.java.sun.com/thread.jspa?threadID=527578&messageID=2533071
    I'm not very good at writing cell editors so I don't. I just override the getCellEditor method to return an appropriate editor. Here's a simple example:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TableComboBoxByRow extends JFrame
         ArrayList editors = new ArrayList(3);
         public TableComboBoxByRow()
              // Create the editors to be used for each row
              String[] items1 = { "Red", "Blue", "Green" };
              JComboBox comboBox1 = new JComboBox( items1 );
              DefaultCellEditor dce1 = new DefaultCellEditor( comboBox1 );
              editors.add( dce1 );
              String[] items2 = { "Circle", "Square", "Triangle" };
              JComboBox comboBox2 = new JComboBox( items2 );
              DefaultCellEditor dce2 = new DefaultCellEditor( comboBox2 );
              editors.add( dce2 );
              String[] items3 = { "Apple", "Orange", "Banana" };
              JComboBox comboBox3 = new JComboBox( items3 );
              DefaultCellEditor dce3 = new DefaultCellEditor( comboBox3 );
              editors.add( dce3 );
              //  Create the table with default data
              Object[][] data =
                   {"Color", "Red"},
                   {"Shape", "Square"},
                   {"Fruit", "Banana"},
                   {"Plain", "Text"}
              String[] columnNames = {"Type","Value"};
              DefaultTableModel model = new DefaultTableModel(data, columnNames);
              JTable table = new JTable(model)
                   //  Determine editor to be used by row
                   public TableCellEditor getCellEditor(int row, int column)
                        int modelColumn = convertColumnIndexToModel( column );
                        if (modelColumn == 1 && row < 3)
                             return (TableCellEditor)editors.get(row);
                        else
                             return super.getCellEditor(row, column);
              JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
         public static void main(String[] args)
              TableComboBoxByRow frame = new TableComboBoxByRow();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);
    }

  • FocusLost event for JTable during cell editing

    When a cell in a JTable is getting edited, how can I get notified of the focusLost event? I added the focus listener using JTable.addFocusListener, but the focusLost of the listener is not called when a cell inside the table is getting edited (it works fine otherwise). I am aware of the client property terminateEditOnFocusLost to solve this problem in 1.4 but I can't use it since I am still on 1.3.1_04.
    Suggestions welcome.

    http://forum.java.sun.com/thread.jsp?forum=57&thread=431440

  • FocusLost event on same component generated multiple times... why?

    This is a reiteration of the topic of a post from Jan. 2006 by Toxter.
    Although Toxter got his problem resolved, the question of the title of his post (same as mine) was never answered.
    Suppose you want to validate text of a component (say, a JTextField) by checking the text when the component loses focus, by implementing the focusLost method in a FocusListener. The listener catches focusLost events from the given component and does validation and if found invalid, opens a warning dialog (say, a JOptionPane). Suppose further that in your implementation of the focusLost method, after returning from the JOptionPane call, you call requestFocusInWindow() on the JTextField so the user can make the correction straight-away. What happens, weirdly, is that you get multiple recurrences of a focusLost event from the very same textfield component, generating multiple JOptionPane popups, before the user is actually able to access the textfield and make a correction.
    No reason was given as to why this happens. Toxter reported that focusLost would get called twice. I routinely get 3 occurrences.
    In any case, why does this happen?
    There are at least a couple of other workarounds besides the one accepted by Toxter:
    1) you can drop the call to textField.requestFocusInWindow... without that call you don't get multiple occurrences of focusLost FocusEvents
    2) you can wrap the call to requestFocusInWindow in a call to SwingUtilities.invokeLater (within the run method of an anonymous Runnable):
         if( !validatePositiveIntegerField(txtFld) )
             JOptionPane.showMessageDialog(this, INPUT_ERR_MSG,
                      INVALID_ENTRY_TITLE, JOptionPane.WARNING_MESSAGE);
             SwingUtilities.invokeLater(new Runnable()
                public void run()
                   txtFld.requestFocusInWindow();
          }Workarounds are great but it's nice to understand the underlying causes of problems too... If anyone (Toxter, do you know?) can give even just a brief nutshell explanation as to why this occurs, I'd like to hear it.
    Thanks in advance.

    Use an InputVerifier:
    http://forum.java.sun.com/thread.jspa?forumID=57&threa
    dID=776107&start=6Thanks for the reply, camickr. Several workarounds were already noted. That wasn't the question. The question was: what is the underlying cause of the multiple occurrences of focusLost events from the given JTextField which cause the JOptionPane to pop up multiple times? On the face of it, it seems to be a bug in how focus events are getting generated. Here is a bit of code that will generate the problem:
       public void focusLost(FocusEvent e)
          if( e.getSource() == txtFld && !validatePositiveIntegerField(txtFld) )
             JOptionPane.showMessageDialog(this, INPUT_ERR_MSG, INVALID_ENTRY_TITLE,
                                           JOptionPane.WARNING_MESSAGE);
             txtFld.requestFocusInWindow();
       }In my previous post, I pointed out that the multiple focusLost events can be avoided if one either drops the call to txtFld.requestFocusInWindow() altogether, or else wraps that call in the run method of a Runnable executed with SwingUtilities.invokeLater. But the question I posed was, why is the code above causing multiple occurrences of focusLost events from the txtFld component?
    Any help in getting an explanation of that seemingly buggy behavior would be appreciated.
    Cheers

  • Capture focusLost event

    Hello
    I'm working with a JProgessBar and I would like it to capture focusLost event?
    Is it possible to do this, without having to customize the src.
    Thanx

    JProgressBar my_bar = ...
    my_bar.addFocusListener(new FocusAdapter()
            public void focusLost(FocusEvent e)
                // event code goes here
        });This is possible because...
    JProgressBar is a type of JComponent
    All JComponents extend Container, which extends Component
    All Components have the ability to add focus listeners.
    Did this answer your question? Let me know if I missed something.

  • Oracle.dacf.control.swing.GridControl Sorting

    Is there an easy way (as with borland.jbcl.swing.GridControl) to
    add a listener to oracle.dacf.control.swing.GridControl (or call
    a method) such that it will re-sort the table based on the column
    header that a user clicks?
    I think the equivalent property in borland.jbcl.swing.GridControl
    is "sortOnHeaderClick"
    Thanks,
    Matt
    null

    Thank you very much for you help. But it was a litle late.
    Because yesterday I had found this way and did it myself.
    But nevertheless thank you indeed.
    And I met a litle problem wneh I tried change this method.
    I need define type of column. Because I wont make
    Caseinsensitive sort only for string fields.
    It looks like simle but I have only ScrollableRowsetAccess and
    ResultSetInfo. And they give me type only by index of field.
    I try to find index by ColumnName parameter. But its name very
    different with name of ScrollableRowsetAccess and ResultSetInfo.
    Could you give me advice for solve this problem.
    Thank you again.
    Yuri

  • Input Validator : FocusLost event handling

    I am new to working with FocusListener and I am trying to use it validate the input of a textfield to be an integer.
    This seems like a seemingly simple thing to do, but I am getting errors.
    Here is a portion of the code where I make the textfield and assign it to a focus listener.
    InputValidator i = new InputValidator();
    resolutionlabel = new JLabel("Resolution: ");
    p.add(resolutionlabel);         
    resolutiontextbox = new JTextField("3200");        
    resolutionlabel.setLabelFor(resolutiontextbox);
    resolutiontextbox.addFocusListener(i);
    p.add(resolutiontextbox);Here is the important parts of the focus listener code:
    public class InputValidator extends FocusAdapter
        public InputValidator()
        public void focusLost(FocusEvent event)
         validate((TextField)(event.getSource()));
        private void validate(TextField field)
    }The error I am getting is on the line where I call the validate function and is listed as :
    java.lang.ClassCastException: javax.swing.JTextField

    this might be an alternative way - it won't accept non-digit characters
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.text.*;
    class Testing extends JFrame
      public Testing()
        setLocation(400,300);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        JPanel jp = new JPanel();
        JTextField tf = new JTextField(new NumberLimiter(),"3200",10);
        jp.add(tf);
        getContentPane().add(jp);
        pack();
      class NumberLimiter extends PlainDocument
        public void insertString(int offs, String str, AttributeSet a) throws BadLocationException
          char[] characters = str.toCharArray();
          for(int x = 0, y = characters.length; x < y; x++)
            if(Character.isDigit(characters[x]) == false)
              java.awt.Toolkit.getDefaultToolkit().beep();
              return;
          super.insertString(offs, str, a);
      public static void main(String[] args){new Testing().setVisible(true);}
    }

  • Calendar alerts created for all-day events contrary to "None" selected in preferences

    In Calendar preferences I have selected None, None, and None. When I create a new event there is no alert, but when I click on the all-day box an alert is scheduled. I can uncheck the all-day box, but is there any way to prevent the box from being checked contrary to the preferences I've set? Perhaps this is a bug. In any case I will report it as such.

    Eric, thank you for the suggestion. I turned off everything in System Preferences/Notifications/Calendar but an alert is still created when I check the all-day box.

  • Why to use Item Attribute with Event in case of some controls

    A question about Event.Item
    When i saw the example of MenuBar , i observed that we can get the data of the MenuBar clciked   using a Event.Item@label .
    I am having a question here , please tell me why Flex Framework is designed in such a way that getting data from the Controls is different for different controls .
    I mean to ask why is it different in ncase of a MenuBar we have to use Event.item@label .
    CXan anybody please tell me why what significance does an Item attribute have in case of a Event ??
    Thanks in advance .

    It looks like you probably have ProductID setup as your key attribute. The key attribute has to be unique as it defines the granularity of your dimension. So based on the data you have shown ItemID should possibly be the key attribute. 
    http://darren.gosbell.com - please mark correct answers

  • Is it ok to trigger 2 event loops off the same control?

    I have two event loops which need to trigger when the Exit button is clicked on. Is it ok to trigger both loops off the same control? It has been working great, but I'm not sure if there could be an issue. Please see below. Thank You!
    Solved!
    Go to Solution.

    sfrosty wrote:
    Another point may be that I have  50 ms wired to the timer in the MENU event structure and don't want any delay in the MAIN Event structure. Not sure if this is a valid point.
    Why?  Are you doing something else in that loop?
    I would recommend moving your menue stuff into your main event loop.  You will thank yourself later.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Funky non or non working control key

    I'm on my second Apple Wireless Keyboard. This is the older one with the numbers on it A1016. The first one needed to be retired because issues and some from the function of the control key.
    On my second used one its like new and I cleaned it well but the control key is the only non functioning key. I even took it apart and cleaned the clear sheets with the sensors but that didn't help. Is this a known issue? Or is there a fix beyond getting a new keyboard?

    There is no known issue that I am aware of.....
    Barry

  • How to separate "Key down" event from panel and numerical control

    Hi, All
    I have a vi proecess key down events for panel and  a numerical control in this panel. the application will do: 
    1. when panel is focused, user can use "up" and "down" key to driver some hardware.
    2. when the numerical control has the focus, "up" and "down" key will change it's value as usual.
    somehow the second one did not work, because the panel "key down" event was trigger as well when I use "up' "down" key inise the numerical control. 
    then I used "Key down?" of numerical control to block the "up/down" key. But the first time when I run the Vi, the panel still got triggered one time. 
    any suggestions on this? test code attached  in this post too. 
    thanks
    CQ
    Solved!
    Go to Solution.
    Attachments:
    KeyDown_Up_valuechange.vi ‏16 KB

    This works for me in 2014.  In short, you just need to check to see if your numeric has the focus.  If it doesn't, then you process the key value.  No need for any other event here except for the stop button.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    KeyDown_Up_valuechange_BD.png ‏32 KB

  • Capturing events from a bluetooth remote control

    I purchased a Fujitsu Remote Control RC900 and installed it on my Windows 7 computer.
    Now I try to capture the remote control key events in a Java application.
    I can catch some events as keyboard events (such as "Enter" or arrow keys) but for many keys I have not found a way to catch any event.
    Still, some media applications can recognize the events.
    I also tried listening mouse events with this swing tutorial class
    http://docs.oracle.com/javase/tutorial/uiswing/examples/events/MouseEventDemoProject/src/events/MouseEventDemo.java
    But no success. Any ideas?
    Is there any remote control event framework for Java, apart from keyboard or mouse events?

    In short - never listen to low-level events from editorComponents (low-level meaning everything below - and most of the time including - a editingStopped/editingCancelled of the cellEditor). Your problem belongs to the model realm - save if a cell value is changed - so solve it in the model realm by listening to event from the tableModel and trigger your business logic when you detect a change in that particular cell value.
    Greetings
    Jeanette

  • Events based on Properties of Controls

    An example of what I'm trying to accomplish:
    Consider trying to create an event that triggers when the user changes the Max or Min of the Range of a Slider control.
    I'd rather not have to poll the control's range to detect the value change. I would much prefer to have an event registered for it.

    A similar question was asked at LAVA recently.
    Long story short, poll the properties, then fire a user event. 
    Ton 
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

Maybe you are looking for

  • Communication Problem between RTD,Pt1000 and MAX

    Bonjour, J'ai un probleme de communication entre MAX et un Agilent, Je dispose d'un agilent 34970A, d'un GPIB et d'une carte insere dans l'agilent (34901A). Avec MAX je communique avec "communicate with instrument" en language SCPI, J'ai reussit a co

  • Time machine can not select my internal hard drive any more.

    Hi all Time machine can not select my internal hard drive any more. I only can back up external disks. Does anyone know how to fix this? All answers are much appreciated

  • Media in the timeline says it needs to be connected, but it plays fine.

    Hey guys, I'm using Final Cut 7 and today I had to disconnect my external drive that has the project I'm currently working with on it. When I reconnected the drive and opened up my project ,some of the clips in the timeline where there is usually a p

  • Service details are not copying from contract to Maint.Order

    Dear Experts, I was doing a service contract cycle, with the following steps. 1. Created a Service contract, in T. Code ME31K. 2. Given all the details in the Header data of the Contract. 3. Mentioned the, Item category as D (Service), Account Assign

  • Photoshop cs6 downloading to my pc

    how do i download to my laptop the photoshop CS6? each time i try it has only the option of downloading a trial. this is paid for already and i am taking a class at comm college and need asap. thank you