Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 3 Jahren, 8 Monaten
Letzter Beitrag:
vor 3 Jahren, 8 Monaten
Beteiligte Autoren:
Yogi Yang, Fabrice Harari

WM17 - Error occurs when trying to enter text in Edit control in a Looper

Startbeitrag von Yogi Yang am 12.12.2014 04: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

//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)


LOOP_Comments.STC_StudentID = nStudentID
LOOP_Comments.STC_StudentName = sStudetnName
LOOP_Comments.EDT_Comments = ""


AccessMySQL.mySQLSuivant(0) //Move Next
END //WHILE (NOT AccessMySQL.mySQLEnDehors)

END //IF AccessMySQL.mySQLGetNumRows(0) > 0 THEN
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.


Yogi Yang



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

von Fabrice Harari - am 12.12.2014 10:08

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.


Yogi Yang

von Yogi Yang - am 13.12.2014 13:49
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:


Yogi Yang

von Yogi Yang - am 16.12.2014 13:22
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.