PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WM20] Opening a mobile window & passing parameters...
[WM20] Opening a mobile window & passing parameters...
Iniciado por guest, 29,jul. 2015 12:45 - 4 respuestas
Publicado el 29,julio 2015 - 12:45
Hi guys,

I have a question about a simple problem I'm experiencing.

In WM20, I have a looper on a window/screen and when I tap on a row I'm passing a text field and an ID to another window. The issue is that I get different results when using the "Go" debug tool and when testing on the actual Android device. In the "Go" tool it works ok but in Android it doesn't.

e.g. I have a Looper linked to a File and have 2 rows:
MyProject01 (ID=1) MyProject02 (ID=2)
In the "Go" tool, if I click on row 1 or 2, I see the correct info on the resulting Window2 after the OpenMobileWindow command.

In Android (after clicking; test on mobile device), if I tap on row 1 for the first time, I always get row 2's information on the resulting window. If I then go back to the 1st window and tap on row 1 it works correctly!

In Window1 the code is really simple; in the Row Selected event, I have OpenMobileWindow(WIN_Window2,Looper1.TextField,Looper1.IDField)

In Window2 the code is equally simple; in the initialize event of the window I simply map the 2 fields as (gTextField is string, gIDField is Int), then set a static field based on the imported value, e.g.; STC_Field = gTextField + " project:"

This seems so fundamental and simple, is what I'm doing wrong?
Publicado el 29,julio 2015 - 13:13
Hi,

Did you try with defining attributes for your looper fields instead of using the fields directly ?

Regards,
Bart
Publicado el 29,julio 2015 - 14:28
I'm with Bart on this one.

Any manipulation of the content of a looper should be handled using attributes.
Says as much in the 'Help' I believe.

Bit more effort when setting things up but in my experience saves a lot oh hassle further down the line.
Publicado el 29,julio 2015 - 16:27
Thanks guys; I hardly ever use Looper controls in WD but now that I'm starting to use WM they are used extensively. It jogged my memory when you mentioned attributes and loopers, so for others that might be reading this (for wharever reason); this is thread that I must have originally read back in Oct 2014 on the subject; http://27130.foren.mysnip.de/read.php…

I'll give it a try... :cheers:
Publicado el 30,julio 2015 - 09:49
Hi all,

As expected, the use of attributes does indeed solve my problem.

It would be good if the Help was written in such a way that placed more emphasis and gave a little more clarification on the use of Attributes.