jasp-stats / jasp-issues

This repository is solely meant for reporting of bugs, feature requests and other issues in JASP.
55 stars 29 forks source link

[Bug]: Computed column error "enter all arguments" but all are given #2781

Open JoKeyser opened 1 week ago

JoKeyser commented 1 week ago

JASP Version

0.19.0

Commit ID

2f53f98b336720bfb44241df4145741a46b1d75e

JASP Module

Unrelated

What analysis are you seeing the problem on?

Compute column via drag & drop

What OS are you seeing the problem on?

Ubuntu 22.04.4 LTS, Flatpak 1.14.4, but this also occurs on earlier JASP versions running on Windows.

Bug Description

When creating a computed column that compares strings, there is first an error ("Please enter all arguments - see fields marked in red") that basically needs to be ignored, i.e. the workaround is to basically "try again", see screen capture below.

screencap-jasp.webm

For reproduction, you can use this file test_str_to_num.csv, here its content as plain text:

strvar
aa
aa
aa
bb
bb
bb
bb

(In a sense, this issue is "just annoying", but this error threw off several of my students who are new to JASP, and it may point at a deeper issue in the code.)

Expected Behaviour

The column should have been calculated after the first attempt, without an error message.

Steps to Reproduce

  1. Create or load a variable with string entries, e.g. load the file test_str_to_num.csv from above.
  2. Try to create a Computed Column by comparing strgvar with a value, e.g. strvar = bb.
  3. Observe error "Please enter all arguments - see fields marked in red".
  4. Click on the argument to remove the error, click again on Compute column and now it works (but leaving behind confusion).

(See screen capture video above.)

Log (if any)

Here are the logs of me opening the test file above, and creating the computed column:

JASP 2024-06-14 13_32_40 Engine 0.log JASP 2024-06-14 13_32_40 Desktop.log

Final Checklist

tomtomme commented 1 week ago

Can confirm. I solve this by hitting "Enter / Return" key after entering strings or numbers. Same with the label editor. If I forget to hit "Enter / Return" the just entered label does not get applied. And yes this is a bit annoying. Would be cool if "enter" could be applied automatically on loosing focus.

JoKeyser commented 1 week ago

@tomtomme ooh, that interpretation is new to me; so you're saying the error message about missing arguments is technically correct, because when focus is moved, the entered text is not yet registered as really entered. That makes sense.

I can confirm that when I press "Enter" before clicking Compute column, it works immediately, as expected.

tomtomme commented 1 week ago

yeah, I think so. Nevertheless this could be improved by accepting the values already when entered or at least when clicking away!