PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → Error on LongClick - Lenovo tablet
Error on LongClick - Lenovo tablet
Débuté par Issa, 28 mar. 2018 08:26 - 3 réponses
Membre enregistré
20 messages
Popularité : +1 (1 vote)
Posté le 28 mars 2018 - 08:26
Hello everybody

Has anyone help me with a suggestion on the next error on a Lenovo tablet ?

I have a table in a window (windev mobile 22) with the next code
// Appui log / Affichage menu contextuel de TABLE_comanda

SI TABLE_Comanda > 0 ALORS
SI TABLE_Comanda.COL_Sel[TABLE_Comanda] = 1 ALORS
TABLE_Comanda.COL_Sel[TABLE_Comanda] = 0
SINON
TABLE_Comanda.COL_Sel[TABLE_Comanda] = 1
FIN
FIN


and the error is

===== Erreur =====
Date et heure=27/03/2018 13:00:19
Message=Attempt to invoke virtual method 'java.lang.Object android.widget.AbsListView.getItemAtPosition(int)' on a null object reference
Pile Java=fr.pcsoft.wdjava.ui.champs.zr.WDZoneRepetee.onValueChanged(Unknown Source)
fr.pcsoft.wdjava.ui.champs.ub.setValeurInterne(Unknown Source)
fr.pcsoft.wdjava.ui.champs.ub.onItemLongClick(Unknown Source)
fr.pcsoft.wdjava.ui.champs.zr.WDZoneRepetee.onItemLongClick(Unknown Source)
android.widget.AbsListView.performLongPress(AbsListView.java:3125)
android.widget.AbsListView$CheckForLongPress.run(AbsListView.java:3074)
android.os.Handler.handleCallback(Handler.java:739)
android.os.Handler.dispatchMessage(Handler.java:95)
android.os.Looper.loop(Looper.java:135)
android.app.ActivityThread.main(ActivityThread.java:5268)
java.lang.reflect.Method.invoke(Native Method)
java.lang.reflect.Method.invoke(Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
Thread=id=1
name=main
priority=5
groupName=main

===== Copie d'écran =====
Chemin=file:///storage/emulated/0/Android/data/***************/cache/err1522144819042.png

===== Application =====
Nom de l'application=*********
Version de l'application=1.0.1.0
Nom du package=***************
Date et heure de lancement=27/03/2018 12:58:06
Version du framework Android=22.0.279.0 (fr)

===== Appareil =====
Modèle=Lenovo TB2-X30L
Constructeur=LENOVO
Marque=Lenovo

===== Système =====
Numéro de version d'Android=5.1.1 (Lollipop)
Api Level Android=22
Mémoire de stockage interne totale=11,13 Go
Mémoire de stockage interne disponible=7,88 Go
Densité de l'écran=160
Résolution de l'écran=800x1280


Thanks a lot,

--
Issa Bej
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 28 mars 2018 - 22:28
Hi Issa

Try this

SI TableCount(TABLE_Comanda) > 0 ALORS
SI TABLE_Comanda.COL_Sel[TABLE_Comanda] = 1 ALORS
TABLE_Comanda.COL_Sel[TABLE_Comanda] = 0
SINON
TABLE_Comanda.COL_Sel[TABLE_Comanda] = 1
FIN
FIN



that Tabe... his content it's the table on DB or is it a Query?

best regards.
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 28 mars 2018 - 22:30
Hi Issa,

Also if that code doesn't work try to delete the table of the window and then create it again...maybe that could help

best regards.
Membre enregistré
20 messages
Popularité : +1 (1 vote)
Posté le 29 mars 2018 - 10:22
Thanks a lot, Jose!
I will inform you if it will be ok.

I have used a memory table.

--
Issa Bej