Bug on foreach with empty list & MsgOnEmpty

Things you’d like to miss in the future...
Post Reply
PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

Bug on foreach with empty list & MsgOnEmpty

Post by PeterH »

If foreach has an empty list, and MsgOnEmpty is specified, XY says that 1st parm is invalid. This is definitely wrong.

Example script: 2 foreach run OK, 3rd & 4th show error. (Click Continue!)
(In real situation the list is a list of files, that can be empty.)

And maybe: a misunderstanding. What *should* MsgOnEmpty really do? And what should happen to the 'returned' var ($v) in this case?
(My expectations seem to be wrong... :whistle: )
Attachments
$tForeach.xys
(842 Bytes) Downloaded 14 times
W7(x64) SP1 German
( +WXP SP3 )

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Bug on foreach with empty list & MsgOnEmpty

Post by admin »

Confirmed, that's a bug (born 20220816). Fix comes. :tup:

PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

[solves] Bug on foreach with empty list & MsgOnEmpty

Post by PeterH »

Bug is gone :tup:
Thanks!

Now it still doesn't do what I expected. But what help documents. :oops:
No problem: I only wanted to use it because I misunderstood. Now it's easy to check for an empty list before the foreach.

So: all is fine again :beer:
W7(x64) SP1 German
( +WXP SP3 )

Post Reply