Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 5 Jahren, 2 Monaten
Letzter Beitrag:
vor 5 Jahren, 2 Monaten
Beteiligte Autoren:
Danny Lauwers, Peter Holemans, Fabrice Harari, GuenterP

WD[18] SourceToScreen Failed ?

Startbeitrag von Danny Lauwers am 15.05.2013 15:39


I am getting an error when I process the results of my class.

In my class there is a array of structures, this is filled from other data. When there is data in this array, the linked table control is filled correctly when I do call SourceToScreen and TableDisplay

But when my result is empty array, I would expect that the table control would just be empty when calling SourceToScreen but I get the following error:

Error at line 31 of Local Procedure OpenIWB process.
SourceToScreen function called.
Link error on the source control .
Dimension 1 of array contains 0 elements. Unable to access element 1.

----- Technical Information -----

Project : WSLCIO

WL call:
Process of 'Local Procedure OpenIWB' (WIN_Start.PROCEDURE.OpenIWB), line 31, thread 0
'SourceToScreen' function, syntax 1

What happened?
Link error on the source control .
Dimension 1 of array contains 0 elements. Unable to access element 1.

Error code: 2304
Level: fatal error (EL_FATAL)

Dump of the error of 'wd180vm.dll' module (
Identifier of detailed information (.err): 2304
Debugging information:
Fonction (1,380)
Additional Information:
Local Procedure OpenIWB (WIN_Start.PROCEDURE.OpenIWB), line 31
Local Procedure CreateNewIWB (WIN_Start.PROCEDURE.CreateNewIWB), line 24
Local Procedure SelectIWB (WIN_Start.PROCEDURE.SelectIWB), line 27
Click BTN_Close2 (WIN_Start.BTN_Close2), line 1
EIT_DATEHEURE : 15/05/2013 17:32:45


Any idea why and how I can solve this ?

I could remove the link, but then I have to fill the table myself ?
In this case it is a small table, but I would like to know what the core problem is !



Hi Danny

there is a big difference between an EMPTY array line, and an empty array (ie an array without any line in it)...

The error messages says:
Dimension 1 of array contains 0 elements. Unable to access element 1.

This means that your array is empty (as in the is no line/row in it)...

For what you want to do, you need to have ONE line with empty fields in it...

Best regards

von Fabrice Harari - am 15.05.2013 15:58
Hi Danny,

I assume that you should look into the difference of static arrays and dynamic arrays. Dynamic arrays can grow and shrink in size while a static array is declared once and contains the defined number of array elements.


von GuenterP - am 15.05.2013 16:40
Hi Danny,

I don't have any problem with similar code but recall having something similar where my reference to the array was incomplete.
ListClass is Class
MyList is Array of SomeClass

Declaration/Use in Window:
MyListInst is ListClass

What happened sometimes was that I was referring to
where this should have been

I guess this may be your case as well.


Peter H.

von Peter Holemans - am 15.05.2013 17:32

Re: WD[18] SourceToScreen Failed (SOLVED)

Thank you for your quick responses...

Ok, because I am still new to Windev I had made the mistake of filling in the Link property of the table to the array to display. I also had the content pointing to the same array.
In the Link property ther was an Array[1] displayed that I found odd.

I removed the Link in the 7 Tab screen and set it to NONE and the content was still pointing to my array.

Problem solved, When the array is empty, I get an empty table as espected !


von Danny Lauwers - am 15.05.2013 19:35
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.