Welcome! Log In Create A New Profile

Advanced

WM 22 Android - strange behaviour loading images

Posted by Peter Muckle 
WM 22 Android - strange behaviour loading images
September 09, 2018 02:52PM
Hi All,

I have a form with 3 buttons (BTN_1, BTN_2, BTN_3) and 5 image controls linked to a db.

the button code:

HReadSeekFirst(imagedb,imageID,gnValue)
FileToScreen(WIN_test,imagedb)

Each button has a different value and should show a different set of 5 images.

The problem is that the images do not show every time each separate button is tapped, or will only show if the other two buttons have been tapped previously. For example,

tap BTN_1 - images blank
tap BTN_2 - images shown
tap BTN_3 - blank
tap BTN_1 - shown (previously blank)
tap BTN_2 - blank (previously shown)
tap BTN_3 - shown

Any ideas how to fix this?

Thanks

Pete
Re: WM 22 Android - strange behaviour loading images
September 09, 2018 03:50PM
Hi Pete,

the first thing to do would be to check the result of the hreadseekfirst function. With the code as displayed, nothing says that a record is found by your search.


Best regards

Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on [www.fabriceharari.com]
Re: WM 22 Android - strange behaviour loading images
September 09, 2018 04:11PM
Hi Fabrice,

There is a line in between that sets a global variable from the imagedb file, which is being updated correctly, so I know that the record is being found. I should have mentioned this.

HReadSeekFirst(imagedb,imageID,gnValue)
gs_db_input=imagedb.db_code
FileToScreen(WIN_test,imagedb)

It seems to be a display issue of some kind?

edit- they are svg format, in case that makes a difference. Everything works fine in Windows test mode.

Cheers

Pete



Edited 1 time(s). Last edit at 09/09/2018 04:13PM by Peter Muckle.
Re: WM 22 Android - strange behaviour loading images
September 09, 2018 05:35PM
I'm having a similar problem with this 'selecting a row' code on a Combo:

HExecuteQuery(QRY_species_by_ID,hQueryDefault,+COMBO_QRY_animal_3)
HReadFirst(QRY_species_by_ID)
WIN_Count.IMG_animal_3=QRY_species_by_ID.species_bcs3

The image shows in Windows test mode, but not on Android.

Just to add, on a new record the images are displayed as intended; if the record is edited and a different selection is made the new image is not displayed.

Pete



Edited 1 time(s). Last edit at 09/09/2018 05:59PM by Peter Muckle.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: