gvSIG bugs #3124

Expression scripts are validated in the General tab of Field calculator too

Added by Antonio Falciano about 9 years ago. Updated about 5 years ago.

Status:Outdated% Done:

0%

Priority:NormalSpent time:-
Assignee:-
Category:Document table
Target version:-
Severity:Minor Add-on version:
gvSIG version:2.1.0 Add-on build:
gvSIG build:2263 Add-on resolve version:
Operative System: Add-on resolve build:
Keywords: Proyecto:
Has patch: Hito:
Add-on name:Tools: Field calculator (org.gvsig.expressionfield)

Description

The expression scripts are validated in the General tab of Field calculator, even if they were "executed for testing" (validated) in the Advanced tab.

Steps in order to reproduce the bug:
  • add a vector layer with a string field in its attribute table;
  • start editing and open its attribute table;
  • select the header of the string field and execute the Field Calculator;
  • click on the Advanced tab of the Field Calculator;
  • copy and paste the following example script in the script editor:
from javax.swing import JOptionPane

def helloWorld():
  return "Hello world" 

# Usage: helloWorld ()
JOptionPane.showMessageDialog(None, 'Usage: helloWorld()', "helloWorld", JOptionPane.INFORMATION_MESSAGE)
  • execute the script for testing;
  • click on the General tab, type helloWorld() in the Expression text area and finally execute it.
Results:
  • the message box appears again (bug), while it should not because only the helloWorld() function should be executed;
  • the next time the script is executed the message box doesn't appear anymore (correct behaviour).

History

#1 Updated by Álvaro Anguix about 5 years ago

  • Status changed from New to Outdated

gvSIG 2.5 has a new "Field calculator" so this bug is outdated

Also available in: Atom PDF