|
| Inicio → WINDEV 2024 → WM17 - Error occurs when trying to enter text in Edit control in a Looper |
| WM17 - Error occurs when trying to enter text in Edit control in a Looper |
| Iniciado por guest, 12,dic. 2014 05:14 - 3 respuestas |
| |
| | | |
|
| |
| Publicado el 12,diciembre 2014 - 05:14 |
In an app that I have built when a user tries to enter text in edit control which is placed in a Looper it generated error after typing in any one Edit control in looper.
The Error screen as grabbed from Samsung Grand mobile [attachment 1272 photo_2014-12-11_11-31-05.jpg]
Here is the screen shot of the Window in question [attachment 1273 2014-12-12_092730.jpg]
Here are the settings that I have set for Looper [attachment 1275 001.jpg]
Here is the code to load Looper I = 1 //Clear Looper LooperDeleteAll(LOOP_Comments) //Show student list for taking attendence //Code to Load Student Data from DB sSQL = "SELECT bm_id,em_sm_id,sm_id,sm_student_roll_no,sm_fname,sm_lname FROM batch_master bm INNER JOIN enrollment_master em ON bm.bm_id=em.em_bm_id INNER JOIN student_master sm ON em.em_sm_id=sm.sm_id WHERE bm_id=" + COMBO_BatchMaster bRetCode = AccessMySQL.mySQLExec(sSQL, 0) IF bRetCode = True THEN IF AccessMySQL.mySQLGetNumRows(0) > 0 THEN AccessMySQL.mySQLPremier(0) //Move First WHILE (NOT AccessMySQL.mySQLEnDehors) nStudentID = AccessMySQL.mySQLCol(0,3) sStudetnName = AccessMySQL.mySQLCol(0,4) + " - " + AccessMySQL.mySQLCol(0, 5) + " " + AccessMySQL.mySQLCol(0, 6) LooperAdd(LOOP_Comments,I) LOOP_Comments.STC_StudentID = nStudentID LOOP_Comments.STC_StudentName = sStudetnName LOOP_Comments.EDT_Comments = "" I++ AccessMySQL.mySQLSuivant(0) //Move Next END //WHILE (NOT AccessMySQL.mySQLEnDehors) END //IF AccessMySQL.mySQLGetNumRows(0) > 0 THEN ELSE Error("Error # " + AccessMySQL.mySQLErreur, AccessMySQL.mySQLGetErrorMessage()) END //IF bRetCode = True THEN Note: Here all the data is coming from MySQL database and I am using web service to load and save data.
What must be the problem here. Why is the app giving error and crashing?
Again if I use this same software in Android Emulator it never crashes.
Please help.
TIA
Yogi Yang |
| |
| |
| | | |
|
| | |
| |
| Publicado el 12,diciembre 2014 - 11:08 |
Hi
the first problem ('maybe the only one), is that you are accessing the field directly, instead of using an attribute
LOOP_Comments.STC_StudentID = xxxx is WRONG Loop_Comments.ATT_OnStudentIDValue = xxxx is RIGHT
That is a BASIC rule for looper and should be observed ALL THE TIME, as some code MAY look like it's going to work when not using attributes but will crash in your face at one point or another
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 13,diciembre 2014 - 14:49 |
Fabrice,
Thanks for the tip.
The error has disappeared!
Now I will have to change code for 38 other Loopers in teh app.
You have saved me from pulling my hair out!
Thanks once again.
Regards,
Yogi Yang |
| |
| |
| | | |
|
| | |
| |
| Publicado el 16,diciembre 2014 - 14:22 |
Follow up update for others.
Even after setting everything in looper as per Fabrice's instructions the app was crashing on some mobiles.
While experimenting on this I found that Enabling Automatic Scrollbars for the Window seems to solve the app crashing problem. :confused:
TIA
Yogi Yang |
| |
| |
| | | |
|
| | | | |
| | |
|