Numeric Text Field Number Type

Noticed today that the user manual as well as the property binding system lists the scripting name for the number type of a Numeric Text Field as ‘Mode’. I have tried to use it in scripting and get an error. I am referencing this in scripting using the standard property insertion methods:

event.source.parent.getComponent('numericDisplay').Mode

I changed the line to:

event.source.parent.getComponent('numericDisplay').mode

and the script runs perfectly. I realize I am running 7.1.7 and am not sure if it has been fixed in the recent releases, but just figured you guys would want to know…

[quote]Traceback (innermost last):
File “event:actionPerformed”, line 1, in ?
AttributeError: instance of ‘com.inductiveautomation.factorypmi.application.components.PMINumericTextField’ has no attribute ‘Mode’

at org.python.core.Py.AttributeError(Py.java)
at org.python.core.PyObject.__getattr__(PyObject.java)
at org.python.pycode._pyx131.f$0(<event:actionPerformed>:1)
at org.python.pycode._pyx131.call_function(<event:actionPerformed>)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyCode.call(PyCode.java)
at org.python.core.Py.runCode(Py.java)
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:391)
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:138)
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:280)
at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:55)
at $Proxy5.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Ignition v7.1.7 (b6048)
Java: Sun Microsystems Inc. 1.6.0_22
[/quote]

You’re absolutely right. Thanks for pointing this out, it’ll be fixed for the next release.