FB5 List Iterator Action, ListOfItems property change

In FB3/4 (and the help for FB5) the List Iterator's ListOfItems property is a TStrings, however in FB5 it is now just a string. Is there a specific reason for this change?

Our build system uses the applicable FB version for older branch builds so this isn't a major problem, but does mean I need to check upgraded projects, so are there any other breaking changes in FB5.x to look out for?

Regards

Simon Page

Hi Simon,

The change was to accomodate the custom list separator option which is now available in the action.

I’m guessing that this is a breaking change for you because of you’re manually accessing the ListOfItems property from script. That wasn’t a possibility which dawned on us, sorry. May I ask what you are doing with the property?

Regards,

Angus

> May I ask what you are doing with the property

I just use it to completely populate the list at run time. I could have used looping or just scripts actions but the list iterator fitted the nature of the task and made testing easier for the particular task..

This doesn't break our older builds as our build process consists of a custom web UI that runs a master FB project (latest FB) that in turn runs the correct version of FB needed to build any branch or tag. This may seems like overkill, but it does protects against these issues which were understandably more common in the FB1/FB2 days - we are still able to run new builds on branches dating back to 2002.  Hence I will just update the latest build projects to set it via the string property and flag the older ones to use FB4.x

You should update the help though as FB5 help says:

You can set the list of items in script from the "OnFirstRun" event.  Example script text:

 Action.ListOfItems.clear

Action.ListOfItems.Add("Item 1")

Action.ListOfItems.Add("Item 2")

Regard,

Simon

Hi Simon,

Right, thanks very much. I’ll have a quick look now and see if we can’t accomodate everyone.

Regards,

Angus

Hi Simon,

Here's a test build with the TStrings property restored:

https://www.finalbuilder.com/downloads/finalbuilder/550/FB550_423.exe

(The change for non-TStrings was only ever in test builds, as of build 376. So it won't change again now, the only limitation is you can only use it the TStrings object from script when you're using a newline as the item delimiter, otherwise you'll get unusual results.)

Regards,

Angus

PS I also updated the help, but it didn't quite get into this build.

>The change was to accomodate the custom list separator option which is now available in the action.

 

Hey, how long has  that been there? I've never noticed it before. That certainly simplifies loading lists at runtime.

It would be even cooler with a regexp option, so you could specify something like ",\s" and have the list split on every instance of space, comma, tab, etc...

 

Steve

It slipped in with test build 376.

Regular expressions is a possibility, although if you need something that complex you’re probably better off using text replace and then iterating over the result.

- Angus

(The change for non-TStrings was only ever in test builds, as of build 376. So it won't change again now, the only limitation is you can only use it the TStrings object from script when you're using a newline as the item delimiter, otherwise you'll get unusual results.)

I presumed it was a general v5 change as I upgraded to build 389 early on due to an assembly info updater bug fix. 

I've now upgraded to build 423 and reverted my script back to the original as my revised one doesn't work with the newer build of course.  However are there any other experimental or breaking changes in build 423 versus the latest official release 348 build?

Regards,

Simon Page

Hi Simon,

No, as a general rule we try not to introduce any breaking changes within a major version, and try to maintain backwards compatibility between major versions as well.

However, sometimes things do slip in to the test builds, as shown in this case. We’re not aware of any other breaking changes, though (if you experience any issues, please let us know.)

- Angus

The new version has introduced a new bug. 

I have another list iteractor action with a FB variable as the single item in the list in the 'List Of Items'  memo control. The item contains two items with a comma separator and with the list separator set as a comma this worked fine in 389.  However in 423 the second item has a trailing CRLF pair which then broke my following text replace action by adding a CRLF in the middle of a line.

........off to add some script to strip the spurious CRLF.

Regards,

Simon Page

Hi Simon,

Ah, right. Thanks for pointing this out (it’s only an issue when the separator is set to other than CRLF.)

Here’s a test build with a fix:

https://www.finalbuilder.com/downloads/finalbuilder/550/FB550_431.exe

- Angus