Welcome! Log In Create A New Profile

Advanced

[WM20] Contents of ErrorInfo

Posted by DarrenF 
DarrenF
[WM20] Contents of ErrorInfo
April 07, 2016 11:30AM
Hi guys,

I'm developing an app in WM20 using Android and HFSQL. I'm testing it on several phones and in the GO test/debugger.

Now, all works fine in the GO mode and on all but 1 of the phones. So, I've written a bit of code that dumps the error info out. The message is helpful in that it tells me it's an integrity error. I have no idea at the moment why it doesn't work on this 1 phone, but I suspect it's analysis version related?

Anyhow, on to my question; the error info is:

Integrity error.
The cardinalities related to the primary key (!d!, !s!) between the < !s!.  !s!> and
<  !s!.  !s!> items are not respected.

I think you probably know what I'm going to ask, so here goes; in Android, does anyone know how I get the actual DB files and fields to be displayed in errorinfo instead of !d! and !s!?
DerekT
Re: [WM20] Contents of ErrorInfo
April 07, 2016 11:54AM
Apologies as this has nothing to do with your question.

On wxLive last week Pete was doing mobile stuff and during the course of his webinar mentioned a couple of products that remove the need to use the sdk emulators.

Bluestacks:- Allows you to run any Android app on your PC
I have not yet tried it so do not now what you need to do to link it into WM but it certainly worked for Pete, automatically picking it up every time time he generated the .exe

iPadian:- Same thing but for iOS
Not even downloaded this one but according to Pete it does work with WD.

Sorry about the hijack
Luis Antonio GutiƩrrez Flores
Re: [WM20] Contents of ErrorInfo
April 07, 2016 03:43PM
Have you uninstalled the app from that phone that is not working?
DarrenF
Re: [WM20] Contents of ErrorInfo
April 07, 2016 04:26PM
Hi Luis,

Yes...sorry, I forgot to mention, I've uninstalled and then re-installed directly via WM and also tried manually copying the .apk to dropbox and installed via the Android installer. I even tried manually copying the .apk directly to a folder on the phone and installing that way. It works on a Nexus tablet with Android 5 and with a different phone running Android 4 - it's just this phone that doesn't work and to add to the confusion, it used to work on the phone and stopped working. If I uninstall the working version on the Android 4 phone and re-install it works! :eek:

I've tried uninstalling, re-booting then re-installing - still doesn't work ...and obviously, short of 'rooting' the phone I can't get to the root directory to see if the DB files/tables are hanging around after the app is uninstalled :confused: ...so I suppose I could write some code to check if the tables exist when the app first runs.

I have a HModifyStructure command in my project code which should bring any Analysis changes into line? If the analysis is kept in line with the HModifyStructure command in my project code, at the moment, I fail to see (that if I'm installing the same .apk file on all the devices), how it works on some devices and not another :confused:

It's very strange... that's why I wrote the code to dump the errorinfo text out so I can see it because Android doesn't crash with an error it just carries on. Luckily, there are only 4 DB files linked/related in this area, so I can start with the trial and error approach to see which table is causing the issue.

...and maybe one of Derek's suggestions; "bluestacks" might give me a clue...?
Mike H
Re: [WM20] Contents of ErrorInfo
April 08, 2016 03:34AM
Hi Darren,

Could the problem be caused by something outside of WinDev?
I used to have my bank's app working just fine on my Android phone. Earlier this year they mandated an update to a new version. Now there are some functions that don't work. And their help desk could not resolve the problem. I have not changed my phone nor upgraded Android.
Rightly or wrongly, I suspect that the Android ecosystem is less than perfect. Phone manufacturers can layer their own UI and are not required to upgrade as Google releases new versions of Android.
The fact that you encounter the problem on only one phone leads me to suggest that it is not caused by WinDev but by some disconnect between the phone manufacturers, the software developer, and Google.

Hope this helps.
DarrenF
Re: [WM20] Contents of ErrorInfo
April 08, 2016 09:13AM
Hi Mike,

Yes, you could well be correct. As long as we use frameworks in our development we'll always have issues like this I feel.

I felt (reasonably) confident I could fix the issue, and as you say, there must have been some kind of disconnect or issue around the different versions doing 'things' slightly differently, picking up or recognising when a change to the Analysis had been made?

Anyhow, I've fixed the reason for the error; I made some changes to the Analysis which (eventually) triggered all the different Android versions to generate the error - even the GO mode started displayed the error - which in turn displayed the full error for me including the DB details I needed :xcool:

However, my original question still stands, how do I get the Android system to display the DB file and field names in the errorinfo/Herrorinfo messages? Is there a way I wonder?

I'm especially keen to find this out so that a production version might be easier to fix when/if bugs and errors are reported.
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: