1. Kevin
  2. Valentina Studio
  3. Пятница, Июль 01 2022, 11:33 PM
  4.  Подписаться через email
SQLite.

Works in Valentina Studio Pro 10.6.3.

Doesn't work in Valentina Studio Pro 12.4.3.

What is supposed to happen: Form A. I click on a button that automatically copies some values, modifies one, and opens Form B. Form B opens and automatically enters the values from Form A, plus one that isn't associated with Form A.

What is happening: Three of the values from Form A are not automatically entered into Form B.

Form A. I click on a button. Four variables are created based on the values in four fields in Form A. One field is a date. I modify the date. I added console.log at the end to see if the values are correct. They are. The values are placed into a method. Open Form B.

Form B. Show Methods. Form B contains the method from Form A. I added console.log at the beginning to see if the values are still correct before they are "assigned" to the fields. They are.

When run, this error displays (three times) for the three variables that do not appear:

16:39:01 [Option<String>] Bad option access.

If I remove the following (and the others representing the other two variables):

this.fld_Start_Min_Total.text = arguments[0];

No errors. No values, representing the three variables, placed into the form, either.

My first value (not one of the variables, not associated with Form A): text into a text field. (works)

My second, third, and fourth values (variables): numbers into integer fields. (doesn't work)

My fifth value (variable - the modified date): date (string) into a text field. (works)

Subsequent testing:

One variable - text - into integer field (works.)

One variable - number - into text field (doesn't work; same error message).

Thanks.
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Hello Kevin,

We'll check it right now.
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
As for the [Option<String>] Bad option access. error.

It is necessary to convert a number to string:

this.fld_Start_Min_Total.text = arguments[0].toString();


Previously, the field value was returned as a string, now it depends on the field type, so the error is generated if there is no conversion.

In the next version, an automatic conversion will be applied on assignment to the LineEdit control.
Комментарий
There are no comments made yet.
Kevin Ответ принят
Sergey,

Adding toString() works. I won't change anything and wait for the next version.

Thank you for taking the time to research.

Kevin
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
A new version is available for download.
Комментарий
There are no comments made yet.
Kevin Ответ принят
Thank you. Works.
Комментарий
There are no comments made yet.
  • Страница :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.