Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 3 Jahren, 8 Monaten
Letzter Beitrag:
vor 3 Jahren, 8 Monaten
Beteiligte Autoren:
Antonio GS, Fabrice Harari, Arie

WM19 - Internal Window Error (SOLVED)

Startbeitrag von Antonio GS am 08.10.2014 14:15

Hello, i will tell you my issue,

I am using an Internal Window Control in a Page in WM19 (iOS proyect).
Inside the Internal Window Control I Add 6 Internal Windows when this Page is loaded.

Each one of this pages have some buttons inside, and the color of the label of this buttons depends on some requirements (taken in care in the load of the page).

So it comes that when I run my code to edit the color of this buttons, it only works with my 2 first pages. When I run code to change the color of any button in pages 3,4,5 or 6 I get an error like this:

Erreur à la ligne 44 du traitement Fin d'initialisation de Page_Example.
L'élément 'IW_Number3.BTN_Test' est inconnu.

----- Informations techniques -----

Projet : ACA_iOS_FA

Appel WL :
Traitement de 'Fin d'initialisation de Page_Example' (Page_Example), ligne 44, thread 0

Que s'est-il passé ?
L'élément 'IW_Number3.BTN_Test' est inconnu.

Code erreur : 1059
Niveau : erreur fatale (EL_FATAL)

Dump de l'erreur du module 'wd190vm.dll' (
Identifiant des informations détaillées (.err) : 1059
Informations supplémentaires :
Fin d'initialisation de Page_Example (Page_Example), ligne 44
EIT_DATEHEURE : 08/10/2014 16:06:59

It's funny because if I change the order of the pages (like 6,5,4,3,2,1) , in this case the only ones working will be the 6 and the 5. I can only work with the controls of the first two pages from the Initialization of the Main Page than includes de Internal Window Control.
If I try to change the color of the button in the 3rd page, I will get the error.

I don't know if this is normal but I have been many hours looking for a solution for this.
I tried many things and I can't get to a solution...

Thank you, any help would be great



Re: WM19 - Internal Window Error

Hi Antonio

are you sure that at the time when you execute your code, ALL the internal windows are already LOADED/INITIALIZED/Exist in memory?

It looks like either you are only opening two of them (or if the system did not have enough time to init everything yet)

Best regards

von Fabrice Harari - am 08.10.2014 14:20

Re: WM19 - Internal Window Error

I tried your idea by waiting 2 or 3 even 10 seconds after loading the windows but I still have the same error.



I also thought that probably loading some windows at the same time and immediately modifying them need some time to load correctly them...

I have tried many things...

Thank you Fabrice

von Antonio GS - am 08.10.2014 14:41

Re: WM19 - Internal Window Error

Hi again

one thing that you could do is:
- Put your button init code into a procedure
- set that procedure to receive as a parameter the Number or Name of the internal window to process
- remove your code from the main window and instead, in each internal window init code, call the procedure for mywindow..name

This way, init code for an internal window is always done inside the internal window

Best regards

von Fabrice Harari - am 08.10.2014 17:19

Re: WM19 - Internal Window Error

Thank you a lot Fabrice! It works!

Moving the code to each Internal Window init code solved the issue. Thank you very much.
I tried many many things but always with the code in the main window.

I don't know if this should be fixed by PC Soft, it's strange (and not explained anywhere) that you can only access to the first two windows in a Internal Window Control from the Page that contains this control.

Thank you,


von Antonio GS - am 09.10.2014 07:59

Re: WM19 - Internal Window Error

Now I have a second problem. And this one I think PC soft should solve it.

I followed your advice so I load the code in each Internal Window. This work fine.

I have some buttons in each screen. This buttons open a page where I can do some stuff, and then return to the page with the Internal Windows. This page has to be loaded again (to recalculate some information).

So I'm saving in a global variable in which internal page i'm now.

For example.

I go to the internal window 3. I have in my code in "Entree dans le page":


So when I open again the page that contains the Internal Windows I run this:


This shows me the page number 3 when I load the page.

It works perfect in the Simulator of WinDev Mobile, but when I compile and install the app in my ipad it doesn't work. It always takes me to the first Internal Window.

I will try a different way but I don't like the fact that some things work differently in the simulator than in the real iPad. With this two problems I've spent too much time.

Thank you,


von Antonio GS - am 09.10.2014 09:40

Re: WM19 - Internal Window Error

Ok, I think I found the solution.

It's just that the code "Entre dans InternalWindow_n...." wasn't being executed on the iPad (I was updating the global variable there).

So I update the variable in a different way and it works.

It came out that the code "Entre dans...", when you enter in a code, it doesn't work on the ipad (only in the simulator), I will write PC soft about it.

For me it looks like a bug, because in the Simulator it works fine.

Thank you all. Now everything works.


von Antonio GS - am 09.10.2014 10:57
I was thinking about your problem, and I have an hypothesis about why you have TWO IW "available" and 2 only....

1. They do not want to load all of them at the beginning (slows down everything, may not be used etc),
2. They need to load the second one immediately for it to be ready if the user SLIDES to it
3. I'm guessing that if the user slides to IW2, then IW3 is then immediately pre-loaded.

If I'm correct, then the fact that you could initialize 2 of the IW from the main window code is just happenstance, due to optimization decisions in their implementation...

If I'm correct, again, it seems that best practice would be to NEVER do what you were initially doing.

Best regards

von Fabrice Harari - am 09.10.2014 12:26
WM19 has some functions to manage internal windows, like IWListPosition() and IWListNext()
Maybe these will help you out.

von Arie - am 09.10.2014 14:14
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.