Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 2 Jahren, 6 Monaten
Letzter Beitrag:
vor 2 Jahren, 6 Monaten
Beteiligte Autoren:
DarrenF, DerekT, Bart VDE

[WM20] Opening a mobile window & passing parameters...

Startbeitrag von DarrenF am 29.07.2015 10: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?

Antworten:

Re: [WM20] Opening a mobile window & passing parameters...

Hi,

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

Regards,
Bart

von Bart VDE - am 29.07.2015 11:13

Re: [WM20] Opening a mobile window & passing parameters...

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.

von DerekT - am 29.07.2015 12:28

Re: [WM20] Opening a mobile window & passing parameters...

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?27131,443223,447600#msg-447600

I'll give it a try... :cheers:

von DarrenF - am 29.07.2015 14:27

Re: [WM20] Opening a mobile window & passing parameters... [solved]

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.

von DarrenF - am 30.07.2015 07:49
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.