1. Kevin
  2. Valentina Studio
  3. Freitag, Juli 01 2022, 11:33 PM
  4.  Abonnieren via E-Mail
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.
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Hello Kevin,

We'll check it right now.
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Kevin Akzeptierte Antwort
Sergey,

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

Thank you for taking the time to research.

Kevin
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
A new version is available for download.
Kommentar
There are no comments made yet.
Kevin Akzeptierte Antwort
Thank you. Works.
Kommentar
There are no comments made yet.
  • Seite :
  • 1


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

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories