Select->Search broken for numeric fileds

With servoy 2.2rc9 executing a find if any numeric fields are filled in and the user chooses Search from the Select menu (as distinct from Enter/F3/etc) the search fails:
“Cannot format given Objexts as a Number”.

Thanks,
Neale.

We are unable to reproduce this, can you sent us a sample solution demonstrating this?

Hmmm… it shouldn’t need a special solution, the one at http://www.lowendale.com.au/~neale/temp/cctest-r04.zip should suffice.

On the first screen, go into find mode, put the digit one in the ID field and do NOT press enter - instead click Select->Search. Error pops up.

Thanks,
Neale.

Servoy Developer
Version R2 2.2rc9-build 327
Java version 1.4.2-50 (Mac OS X)

I downloaded this solution and checked it and can verify that this happens as Neale has stated.

The error is generated when running the search using :
F3, Select → Search and Reduce or Extend from the menu bar

It does not happen when hitting enter or return key to trigger the search operation and seems limited to the integer field as finds on text fields seem to work fine.

My .log.txt file shows the following:

java.lang.IllegalArgumentException: Cannot format given Object as a Number
at java.text.NumberFormat.format(NumberFormat.java:219)
at java.text.Format.format(Format.java:133)
at javax.swing.text.InternationalFormatter.valueToString(InternationalFormatter.java:291)
at com.servoy.j2db.dataui.DataField$b.valueToString(Unknown Source)
at javax.swing.JFormattedTextField$AbstractFormatter.install(JFormattedTextField.java:921)
at javax.swing.text.DefaultFormatter.install(DefaultFormatter.java:105)
at javax.swing.text.InternationalFormatter.install(InternationalFormatter.java:268)
at com.servoy.j2db.dataui.DataField$b.install(Unknown Source)
at javax.swing.JFormattedTextField.setFormatter(JFormattedTextField.java:443)
at com.servoy.j2db.dataui.DataField.setFormatter(Unknown Source)
at javax.swing.JFormattedTextField.setValue(JFormattedTextField.java:767)
at javax.swing.JFormattedTextField.setFormatterFactory(JFormattedTextField.java:399)
at com.servoy.j2db.dataui.DataField.setValidationEnabled(Unknown Source)
at com.servoy.j2db.dataprocessing.ar.setFindMode(Unknown Source)
at com.servoy.j2db.dataprocessing.d.if(Unknown Source)
at com.servoy.j2db.FormPanel.u(Unknown Source)
at com.servoy.j2db.FormPanel$1.run(Unknown Source)
at com.servoy.j2db.dataprocessing.FoundSet.performFind(Unknown Source)
at com.servoy.j2db.FormPanel.performFind(Unknown Source)
at com.servoy.j2db.cmd.ad.doIt(Unknown Source)
at com.servoy.j2db.cmd.c$2.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

Cheers
Harry

fixed in the final of 2.2

Excellent !

Thanks Johan

Cheers
Harry