DropDown.enabled bug in Omnicore App SDK
 
            
                
                    Fritz                
                
                     ✭                
            
                        
            
                    There seams to be bug in javascript library with "enabled" property of DropDown component. It will generate error on html page: 
                
                        "Document Load event routine failed. >>> TypeError: Unable to get property '_enabled' of undefined or null reference"
Code in Load event, that generates it, is following:
                drpLoggingLevel = new FPComponents.Dropdown_A();
                drpLoggingLevel.model = 
                {
                    items: 
                    [
                        "Silent",
                        "Brief",
                        "Verbose",
                        "Debug",
                    ]
                };
                drpLoggingLevel.selected = 2;
                drpLoggingLevel.onselection = doOnLoggingLevelChange;
                drpLoggingLevel.enabled = false; // bug in API ? - will generate error
                drpLoggingLevel.attachToId("LoggingLevelDropdown");
            Tagged:
            
        
0  
            Comments
- 
            OK, solved it immediately by myself.Writing "enabled" property must be AFTER attaching component to DIV element:drpLoggingLevel.attachToId("LoggingLevelDropdown");drpLoggingLevel.enabled = false;
 It might be still bug, as all other components will work either way.
 But at least workaround for now.
 0
Categories
- All Categories
- 5.6K RobotStudio
- 401 UpFeed
- 21 Tutorials
- 15 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 363 IRC5
- 80 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 853 RAPID Programming
- 31 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 110 Collaborative Robots
- 5 Job listings