JTree selection problem when using custom renderer and editor

Hello:
I created a JTree with custom renderer and editor.
The customization makes JCheckBox to be the component
responsible for editing and rendering.
The problem is that when I click on the node with the checkbox
the JTree selection model does not get updated.
Without customizations of the editor and renderer the MouseEvent would be fired and BasicTreeUI$MouseHandler.mousePressed() method would call
the selectPathForEvent() method which would be responsible for updating
the selection model. At the same time if I attach a mouse listener to the JTree (customized) I see the events when clicking on the nodes. It seems like the MouseEvent gets lost and somehow as a result of which the selection model does not get updated.
Am I missing something?
Thanks
Alexander

You probably forgot to call super.getTreeCellRendererComponent(...) at the beginning of your getTreeCellRendererComponent(...) method in your custom renderer.
Or maybe in the getTreeCellEditorComponent(...) of the TreeCellEditor...

Similar Messages

  • JTable Renderer-Promblem when using custom renderer

    Hi. i've just started studying Swing component.
    So i'm about to ask for help to solve the problem during using custom TableCellRenderer.
    Here is my own Renderer which extends JLable and implements TableCellRenderer
    public Component getTableCellRendererComponent(JTable table, Object value,boolean isSelected,boolean hasFocus,int row,int column)
         if (isSelected) {
         setForeground(table.getSelectionForeground());
         super.setBackground(table.getSelectionBackground());
         else {
         setForeground(table.getForeground());
         setBackground(table.getBackground());
         JLabel right=new JLabel("LEFT");
         JLabel left=new JLabel("RIGHT");
         this.setLayout(new BorderLayout());
         this.add(left,BorderLayout.WEST);
         this.add(right,BorderLayout.EAST);
         return this;
    note: There are 3 JLabel components. Two components are added to the component will be returned.
    This code works fine.
    but whenever try to resize the column display using above renderer, The " Text " runs in resizing.(making traces)
    Please anybody try to run this code, show me some solution.
    thank you

    A renderer will have its getTableCellRendererComponent method called repeatedly, every time a cell is to be repainted, and its the renderer associated with that cell. Therefore, avoid doing things in this method that should only be done once, for example:
    JLabel right=new JLabel("LEFT");
    JLabel left=new JLabel("RIGHT");
    this.setLayout(new BorderLayout());
    this.add(left,BorderLayout.WEST);
    this.add(right,BorderLayout.EAST);Can you do that in the renderer's constructor?

  • '...' not appearing in obscured table cell when using custom renderer.

    Hello all -
    I am using a custom JPanel as a cell renderer in a JTable to display two icons per cell. Unfortunately, I am running into a problem that occurs when resizing a column such that the width of the column is less than the size of the cell content. Normally, when resizing a cell in this manner, it will start to cut off the text within the cell and add '...' to signify that some material is obscured. However, using my cell renderer, the text simply cuts off with no indication whatsoever there is more content that is being hidden. I have tried looking through the JComponent code to find a function to overload but I haven't had much luck. Does anyone have any suggestions?
    For a simple example, compile and run the following code and try resizing the two columns. You should be able to notice the difference.
    Thanks,
    - Alex
    import java.awt.*;
    import java.awt.image.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TwoIcons extends JFrame {
         public static void main(String[] args){
              createIcons();
              SwingUtilities.invokeLater
                   new Runnable()
                        public void run() {
                             new TwoIcons();
         public TwoIcons(){
              super("Test");
              DefaultTableModel tm = new DefaultTableModel(
                   new Object[][]{
                        {new IconPair("cross", "cross"), "just a string"},
                        {new IconPair("circle", "cross"),"just another string"},
                        {new IconPair("String", "circle"),"yet another string"}
                   }, new String[]{"Two Icons","String"}){
                   public Class getColumnClass(int columnIndex){
                        if(columnIndex==0){
                             return IconPair.class;
                        else
                             return super.getColumnClass(columnIndex);
              JTable table = new JTable(tm);
              final Color bg = table.getBackground();
              table.setDefaultRenderer(IconPair.class, new TableCellRenderer(){
                        RendererPanel renderer = new RendererPanel(bg);
                        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                             renderer.setIcons((IconPair)value);
                             return  renderer;
              JScrollPane scp = new JScrollPane(table);
              add(scp);
              setSize(400,100);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              pack();
              setVisible(true);
         class RendererPanel extends JPanel{
              JLabel icon1, icon2;
              RendererPanel(Color bg){
                   setLayout(new BoxLayout(this,BoxLayout.LINE_AXIS) );
                   icon1=new JLabel();
                   icon2=new JLabel();
                   add(icon1);
                   add(icon2);
                   setBackground(bg);
              public void setIcons(IconPair value) {
                   icon1.setIcon(value.i1);
                   icon1.setToolTipText("Icon 1");
                   icon2.setIcon(value.i2);
                   icon2.setToolTipText("Icon 2");
                   //uncomment next 2 lines if you want text as well
                   icon1.setText(value.s1);
                   icon2.setText(value.s2);
         class IconPair {
              public Icon i1,i2;
              public String s1,s2;
              IconPair(String s1, String s2){
                   this.i1=(Icon)icons.get(s1);
                   this.i2=(Icon)icons.get(s2);
                   this.s1=s1;
                   this.s2=s2;
         static Map icons = new HashMap();
         public static  void createIcons(){
              Image img = new BufferedImage(10,10, BufferedImage.TYPE_INT_ARGB);
              Graphics2D g2=(Graphics2D)(img.getGraphics());
              g2.setColor(Color.BLUE);
              g2.drawLine(0,0,10,10);
              g2.drawLine(0,10,10,0);
              icons.put("cross",new ImageIcon(img));
              img = new BufferedImage(10,10, BufferedImage.TYPE_INT_ARGB);
              g2=(Graphics2D)(img.getGraphics());
              g2.setColor(Color.ORANGE);
              g2.drawOval(1,1,8,8);
              icons.put("circle",new ImageIcon(img));
    }

    Things aren't resizable in your layout for the custom renderer. Here's your code working as you want (I think)
    import java.awt.*;
    import java.awt.image.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TwoIcons extends JFrame {
         public static void main(String[] args){
              createIcons();
              SwingUtilities.invokeLater
                   new Runnable()
                        public void run() {
                             new TwoIcons();
         public TwoIcons(){
              super("Test");
              DefaultTableModel tm = new DefaultTableModel(
                   new Object[][]{
                        {new IconPair("cross", "cross"), "just a string"},
                        {new IconPair("circle", "cross"),"just another string"},
                        {new IconPair("String", "circle"),"yet another string"}
                   }, new String[]{"Two Icons","String"}){
                   public Class getColumnClass(int columnIndex){
                        if(columnIndex==0){
                             return IconPair.class;
                        else
                             return super.getColumnClass(columnIndex);
              JTable table = new JTable(tm);
              final Color bg = table.getBackground();
              table.setDefaultRenderer(IconPair.class, new TableCellRenderer(){
                        RendererPanel renderer = new RendererPanel(bg);
                        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                             renderer.setIcons((IconPair)value);
                             return  renderer;
              JScrollPane scp = new JScrollPane(table);
              getContentPane().add(scp);
              setSize(400,100);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              pack();
              setVisible(true);
         class RendererPanel extends JPanel{
              JLabel icon1, icon2;
              RendererPanel(Color bg){
                   setLayout(new BoxLayout(this,BoxLayout.LINE_AXIS) );
                   icon1=new JLabel();
                   icon2=new JLabel();
                   add(icon1);
                   add(icon2);
                   icon1.setMinimumSize(new Dimension(0, 0));
                   icon2.setMinimumSize(new Dimension(0, 0));
                   icon1.setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
                   icon2.setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
                   setBackground(bg);
              public void setIcons(IconPair value) {
                   icon1.setIcon(value.i1);
                   icon1.setToolTipText("Icon 1");
                   icon2.setIcon(value.i2);
                   icon2.setToolTipText("Icon 2");
                   //uncomment next 2 lines if you want text as well
                   icon1.setText(value.s1);
                   icon2.setText(value.s2);
         class IconPair {
              public Icon i1,i2;
              public String s1,s2;
              IconPair(String s1, String s2){
                   this.i1=(Icon)icons.get(s1);
                   this.i2=(Icon)icons.get(s2);
                   this.s1=s1;
                   this.s2=s2;
         static Map icons = new HashMap();
         public static  void createIcons(){
              Image img = new BufferedImage(10,10, BufferedImage.TYPE_INT_ARGB);
              Graphics2D g2=(Graphics2D)(img.getGraphics());
              g2.setColor(Color.BLUE);
              g2.drawLine(0,0,10,10);
              g2.drawLine(0,10,10,0);
              icons.put("cross",new ImageIcon(img));
              img = new BufferedImage(10,10, BufferedImage.TYPE_INT_ARGB);
              g2=(Graphics2D)(img.getGraphics());
              g2.setColor(Color.ORANGE);
              g2.drawOval(1,1,8,8);
              icons.put("circle",new ImageIcon(img));
    }Note that the ... is a function of the JLabel when it is too small to render its text.

  • How to make reference wbs custom data carried to new wbs when using custom tab and custom table

    I created a custom tab for WBS elements by using user exit CNEX0007 and custom screen and put a table control in it.
    As table control's data has to be stored in a table I could not use append structure of PRPS.
    When I used reference wbs, PRPS custom fields were carried also but I could not find any solution to fill table control data with reference table.
    I need to get correspondence between reference number's and new id's key data. Is there any exit, enh. that I can store the relationship.

    Solved...
    I've used an enhancement point in include LCNPB_MF38.  CJWB_SUBTREE_COPY exports a table called newnumbers. Here you can find correspondances between copied WBS and new WBS.
    Exported table to memory id.
    And imported it in another user-exit. You can use proper user exit for your need.  ( EXIT_SAPLCNAU_002)

  • Problem when using WEB.SHOW_DOCUMENT and passing in lexical parameter

    Hi,
    I got a blank page with error "An error has occured while trying to use this document" when I tried to use web.show_document and passing a lexical parameter to 10g report on 10gAS. The URL in the web.show_document is:
    http://<srvname>:<portnum>/reports/rwservlet?server=repserver90&report=myrpt.rdf&destype=Cache&desformat=pdf&userid=<usr>/<pw>@<db>&where_clause=where%20product_type%20in%20('REPORT')
    If I change the desformat to htmlcss, it is fine to display the report. But doesn't work with desformat=pdf. The pdf file has been generated in the cache. Why can't it display on the screen.
    Also I tried to use double quote the value for where_clause. The pdf report showed up. But it ignored the where clause.
    Experts please help.
    Ying

    I use lexical parameters and they work fine, but I use a parameter list. The code is contained in a form that is called by all forms that wish to run a report. This way you only need the logic for printing in a single form. If you want the form, email me at [email protected]

  • JCheckBox as nodes in JTree having problems with custom renderer and editor

    Ok, let me give some background. I have an XML document that I am parsing and reading in as a JTree. Works fine.
    Next, I have overwritten the DefaultTreeCellEditor to return a JCheckBox and in this implementation of the getTreeCellEditorComponent(), I actually tell the node that he is selected. Works great.
    Next, I have overwritten the DefaultTreeCellRenderer to return a JCheckBox and in the implementation of the getTreeCellEditorComponenet, I actually check to see if the Node is selected in the tree based upon the isSelected state of the actual Tree Node set in the tree cell editor, and if so, I set the JCheckBox to selected(true).Works Great.
    Now, here is the issue. If a node in the tree is selected that contains children, then I want all of the children of that node to also be selected. However, when I select a node with children only the selected node is changed, and then a few moments later, the system repaints the entire tree and ALL nodes int the tree are set to a selected state. Strange? Yes. Any ideas?? WONDERFUL!! :)
    Here is the TreeCellEditor code:
    public Component getTreeCellEditorComponent(JTree tree,
    Object value,
    boolean isSelected,
    boolean expanded,
    boolean leaf,
    int row)
    elementCheckBox_ = new JCheckBox();
    Component result = null;
    System.out.println("isSelected? Editor = " + isSelected);
    TreePath newPath = tree.getPathForRow(row);
    System.out.println("value = " + value.getClass().toString());
    if(value instanceof IMarketTreeNodeElement)
    if(isSelected)
    if(((IMarketTreeNodeElement)value).isSelected())
    ((IMarketTreeNodeElement)value).setSelected(false);
    else
    ((IMarketTreeNodeElement)value).setSelected(true);
    elementCheckBox_.setSelected(isSelected);
    return elementCheckBox_;
    Here is the TreeCellRenderer code:
    public Component getTreeCellRendererComponent(JTree tree,
    Object value,
    boolean selected,
    boolean expanded,
    boolean leaf,
    int row,
    boolean hasFocus)
    Color colSelBorderCol = UIManager.getColor
    ("Tree.selectionBorderColor");
    selBorder_ = BorderFactory.createLineBorder(colSelBorderCol, 1);
    normBorder_ = BorderFactory.createEmptyBorder(1,1,1,1);
    elementCheckBox_.setText(value.toString());
    if(selected)
    elementCheckBox_.setSelected(selected);
    elementCheckBox_.setForeground(Color.YELLOW);
    elementCheckBox_.setBackground(Color.RED);
    else
    elementCheckBox_.setForeground(tree.getForeground());
    elementCheckBox_.setBackground(tree.getBackground());
    if (hasFocus)
    elementCheckBox_.setBorder(selBorder_);
    else
    elementCheckBox_.setBorder(normBorder_);
    return elementCheckBox_;
    Here is the Node Code setting all child nodes to selected:
    public void setSelected(boolean selected)
    isSelected_ = selected;
    if(isSelected_)
    if((this.getTagName() == "MARKET") ||
    (this.getTagName() == "TIER") &&
    (this.getChildCount() != 0))
    selectChildren(true);
    else
    if((this.getTagName() == "MARKET") ||
    (this.getTagName() == "TIER") &&
    (this.getChildCount() != 0))
    selectChildren(false);
    public boolean isSelected()
    return isSelected_;
    public void selectChildren(boolean selected)
    int children = getChildCount();
    for(int i = 0; i < children; i++)
    IMarketTreeNodeElement elem = (IMarketTreeNodeElement)
    this.getChildNodes().item(i);
    isSelected_ = selected;
    Thanks for any help! :-)

    I tried to run your sample code and it won't compile. The header files:
    #include
    #include
    #include
    #include
    #include
    do not exist on my install of MeasurementStudio. I am a bit suspicous that I don't have the latest and greatest (loading the dialong resouce gave version warnings). Here is one of my header file headers:
    //==============================================================================
    // Title : NiAxes3d.h
    // Copyright : National Instruments 1999. All Rights Reserved.
    // Purpose : Defines the CNiAxes3D class.
    //==============================================================================
    I
    looked on your updates site and don't really see an update that applies to ComponentWorks or MeasurementStudio. My version per the MAX program for 3DControls is 3.5.549.
    Do I need a newer version? What do I have to do to get the updated version? What does it cost?
    Chuck

  • Strange problem when using custom authentication schema

    Hello,
    I'm building a custom authentication system for the application. Basically, I followed the blog post from Martin: http://www.talkapex.com/2009/03/custom-authentication-status.html
    However, the authentication seems working fine at the beginning when running the page 101 from Application Builder and log in, but when I log out from the application (redirect back to page 101) and try to log in with the same credentials, it gives error message "Invalid Login Credentials ". Also, when the application is accessed from public (open page 101 directly using another computer), the authentication doesn't work at all.
    Furthermore, I checked the table apex_workspace_access_log and found out that it has "AUTH_SUCCESS" even if using the fake credentials and the login failed (I use "apex_util.set_authentication_result (p_code => 3);" when auth function return false).
    I couldn't find the cause of the problem, then I created the same custom authentication in apex.oracle.com. The problem doesn't appear anymore. To make sure they are same, I have double checked the custom authentication in both the development environment and the apex.oracle.com.
    This is very strange to me and I don't know where to looking for the problem. Could you give me some advice of what may cause this problem. Thanks in advance!

    I found the problem myself. The cause is the VPD, the account table has VPD policy applied, which prevented public access.

  • TS2755 Hi all, I bought one iphone and 3 ipads, i set up all on one apple ID. Now i have a problem when using messages: when sending message from one device it appears again on screen from the other 3 devices. I need help of how to set up messages on each

    Hi all, I bought one iphone and 3 ipads, i set up all on one apple ID. Now i have a problem when using messages: when sending message from one device it appears again on screen from the other 3 devices. I need help on how to set up messages on each device separately and to start using messages app on each device independently. Thanks

    search google for "iphone remove picture from contact"

  • I have problems when using the camera on my iPhone 4S (the same for my daughter with a iPhone4) A veil around the blurred photo, a development impossible and completely unable to read the bar code or QR code. What to do?

    I have problems when using the camera on my iPhone 4S (the same for my daughter with a iPhone4)
    A veil around the blurred photo, a development impossible and completely unable to read the bar code or QR code. What to do?

    Sounds kind of stupid, but check to make sure that your iphone case cover is not blocking the edge of the camera lens.  I had a silicone case on my 3S and when it got older, it started tot slip and the edges of my pictures were blurred.

  • I upgraded to Lion and then all video clips on for instance Youtube freeze every tenth second to buffer more data. I have a MacBook Pro and never had any problems when using Snow Leopard. Ulf Magnusson, Sweden

    I upgraded to Lion and then all video clips on for instance Youtube freeze every tenth second to buffer more data. I have a MacBook Pro and never had any problems when using Snow Leopard. Has Lion problems with this?
    Ulf, Sweden

    Use the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
    This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.

  • When using FireFox I often cannot view pictures in Hotmail, but have no problem when using other browsers

    When using FireFox I often cannot view pictures in Hotmail emails, but I have no problem when using other browsers

    Do you also have this issue if you temporarily switch to Private Browsing mode?
    *https://support.mozilla.org/kb/Private+Browsing
    *Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
    *Select: [X] "Always use private browsing mode"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    See also:
    *https://support.mozilla.org/kb/fix-login-issues-on-websites-requrie-passwords

  • Interactive Report - search does not work when using custom authentication

    Apex 3.2.x
    I can authenticate fine with my custom authentication and all of my pages work okay except for one page that uses the Interactive Report feature. When I click 'Filter' then enter the column name, operation (contains, =, like, etc.) and the expression, then click the 'Apply' button, the page just re-displays and my filter information is missing?
    If I first login to Apex, select and run my application, the Interactive Report features work just fine. What's missing?

    More information:
    After login into my Apex workspace (development environment), when I display the Interactive Report and click debug I see this debug message:
    "using existing session report settings"
    When I login using my application's custom authentication and click debug I see this debug message:
    "creating session report settings as copy of public saved report"
    Based on this, it appears that my session info in not set correctly when using custom authentication... but I'm not sure what needs to be set.
    Edited by: user9108091 on Oct 22, 2010 6:44 AM

  • ORA-01403: no data found Problem when using AUTOMATIC ROW FETCH to populate

    ORA-01403: no data found Problem when using AUTOMATIC ROW FETCH to populate a form.
    1) Created a FORM on EMP using the wizards. This creates an AUTOMATIC ROW FETCH
    TABLE NAME - EMP
    Item Containing PRIMARY KEY - P2099_EMPNO
    Primary key column - EMPNO
    By default the automatic fetch has a ‘Process Error Message’ of ‘Unable to fetch row.’
    2) Created a HTML region. Within this region add
    text item P2099_FIND_EMPNO
    Button GET_EMP to submit
    Branch Modified the conditional branch created during button creation to set P2099_EMPNO with &P2099_FIND_EMPNO.
    If I then run the page, enter an existing employee number into P2099_EMPNO and press the GET_EMP button the form is populated correctly. But if I enter an employee that does not exist then I get the oracle error ORA-01403: no data found and no form displayed but a message at the top of the page ‘Action Processed’.I was expecting a blank form to be displayed with the message ‘Unable to fetch row.’
    I can work around this by making the automated fetch conditional so that it checks the row exists first. Modify the Fetch row from EMP automated fetch so that it is conditional
    EXIST (SQL query returns at least one row)
    select 'x'
    from EMP
    where EMPNO = :P2099_EMPNO
    But this means that when the employee exists I must be fetching from the DB twice, once for the condition and then again for the actual row fetch.
    Rather than the above work around is there something I can change so I don’t get the Oracle error? I’m now wondering if the automatic row fetch is only supposed to be used when linking a report to a form and that I should be writing the fetch process manually. The reason I haven’t at the moment is I’m trying to stick with the automatic wizard generation as much as I can.
    Any ideas?
    Thanks Pete

    Hi Mike,
    I've tried doing that but it doesn't seem to make any difference. If I turn debug on it shows below.
    0.05: Computation point: AFTER_HEADER
    0.05: Processing point: AFTER_HEADER
    0.05: ...Process "Fetch Row from EMP": DML_FETCH_ROW (AFTER_HEADER) F|#OWNER#:EMP:P2099_EMPNO:EMPNO
    0.05: Show ERROR page...
    0.05: Performing rollback...
    0.05: Processing point: AFTER_ERROR_HEADER
    I don't really wan't the error page, either nothing with the form not being populated or a message at the top of the page.
    Thanks Pete

  • Problem when using About Operator in Contains Query

    Hi,
    I'm new to Oracle and this forums too. I have a problem when using about operator in contains query.
    I create a table with some records and then create a context index on 'name' column.
    CREATE TABLE my_items (
      id           NUMBER(10)      NOT NULL,
      name         VARCHAR2(200)   NOT NULL,
      description  VARCHAR2(4000)  NOT NULL,
      price        NUMBER(7,2)     NOT NULL
    ALTER TABLE my_items ADD (
      CONSTRAINT my_items_pk PRIMARY KEY (id)
    CREATE SEQUENCE my_items_seq;
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Car', 'Car description', 1);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Train', 'Train description', 2);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Japan', 'Japan description', 3);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'China', 'China description', 4);
    COMMIT;
    EXEC ctx_ddl.create_preference('english_lexer','basic_lexer');
    EXEC ctx_ddl.set_attribute('english_lexer','index_themes','yes');
    EXEC ctx_ddl.set_attribute('english_lexer','theme_language','english');
    CREATE INDEX my_items_name_idx ON my_items(name) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS('lexer english_lexer');
    EXEC ctx_ddl.sync_index('my_items_name_idx');Then I perform contains query to retrieve record :
    SELECT count(*) FROM my_items WHERE contains(name, 'Japan', 1) > 0;
    COUNT(*)
          1
    SELECT count(*) FROM my_items WHERE contains(name, 'about(Japan)', 1) > 0;
    COUNT(*)
          1But the problem is when I using ABOUT operator like in Oracle's English Knowledge Base Category Hierarchy it return 0
    SELECT count(*) FROM my_items WHERE contains(name, 'about(Asia)', 1) > 0;
    COUNT(*)
          0
    SELECT count(*) FROM my_items WHERE contains(name, 'about(transportation)', 1) > 0;
    COUNT(*)
          0I can't figure out what 's wrong in my query or in my index.
    Any help will be appreciated.
    Thanks,
    Hieu Nguyen
    Edited by: user2944391 on Jul 10, 2009 3:25 AM

    Hello (and welcome),
    You'd be best asking this question in the Oracle Text forum, here:
    Text
    And by the way, it will help others to analyse if you put {noformat}{noformat} (lowercase code in curly brackets) before and after your code snippets.
    Good luck!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Coercion problem when using Shared Variable

    I have a curious coercion problem when using Shared Variables.  I want to share the state of a State Machine, which is an enum saved as a control (typedef) called TYPE State (see attached).  I create a shared variable called State and define it as a Custom Control, using the just-mentioned typedef.  So far, so good.  I've attached three simple VIs -- the first one, Init State, simply wires a constant to the input of the Shared Variable to initialize it -- the wired constant is, of course, defined by the typedef.  However, the Get State and Set State, meant to wire an indicator (for reading the state) or control (for setting it), develop coercion dots when wired into the Shared Variable.  Why?  How do I get rid of the dot?  [I suppose I could abandon my typedef and custom control, but the beauty of typedefs and custom controls is that it "enforces" rules, lets you use enums for clarity, keeps the code "honest", etc. -- I'd hate to give that up just to get rid of a dot!].
    On a related note, the code seems to work.  This is much too simplistic to do anything, but if you open Set State and Get State, set the state to anything, run it (it immediately stops, of course), then run Get State, you'll see the chosen state appear in the indicator.  So it does appear to work.  The "error" (coercion dot) may, I suppose, be a "bug" in Labview because it can't figure out the mapping of the (very simple!) Custom Control, but if so, I hope it gets fixed quickly!
    Bob Schor
    Attachments:
    Coercion Problem1.zip ‏38 KB

    Hello Bob,
    I am also seeing this behavior, I will escalate this question to our LabVIEW developers and post again here no later than next Tuesday, November 27th as National Instruments will be closed for the remainder of this week.
    If this issue does turn into a product suggestion, I would suspect the workaround would to live with the coersion dot for the time being.
    Enjoy the holiday
    Regards,
    Erik J.
    Applications Engineer
    National Instruments

Maybe you are looking for

  • Java-iViews-Errors in BP for CRM

    After importing BP 6.0 for CRM 4.0, the Java iViews (e.g. Today's Activities or My Tasks) don't work. Instead we get an error like this: Portal Runtime Error An exception occurred while processing a request for : iView : N/A Component Name : N/A com/

  • [solved] fancontrol - fan speed doesn't seem to change after boot

    I used fancontrol to control my fan but after I rebooted it doesn't seem to speed up the fan when it hits MAXTEMP whereas it did before I rebooted. Before the boot I set the CPU governer to performance (3.1Ghz) to heat up the cpu to test the fan cool

  • Is there a device that extends the range of airport?  it doesn't reach throughout my home.

    is there a device that extends the range of airport?  it doesn't reach throughout my home.

  • Sale Report

    With T-Code cic3 or vc/2 Sales Summary is not executing -- Giving Error at Status Bar -- No view can be determined for application RVKUSTA1 for user VENEET And with T-Code MCTG Sales Office Analysis is also not executing -- Giving Error (Information)

  • Isg_Upgradation_Standby_Database

    Hi All, I have DR setup in which Oracle Database 10.1.0.3.0 is installed.I m planning to migrate it to 11.2.0.1.0 Database version.Can anybody will provide me a note having a proper steps to migrate my Primary And standby database to oracle Newest Ve