[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: reading recursive

  • Thread starter Thread starter Laura Stern
  • Start date Start date
Status
Not open for further replies.
L

Laura Stern

Guest
The problem is that when you get down to the bottom level where there are no more directories, System.IO.Directory:GetDirectories(ipDirectory) returns an empty array (an array with no elements). We cannot convert that into an ABL array, as there is no such thing as an array with no elements in the ABL. So before you do that assignment, you need to get the System.String[] into a variable (defined as "System.String[]") and check its Length property. If the length is 0, then you know you need to stop. And since you are already getting it as a .NET object, you might as well just leave it as that, instead of converting it to an ABL array, as I said before. Just use it like an object - by calling its method GetValue(ix) to get the element you want (making sure ix is based at 0). If you're going to use .NET to do things, it would be good if you learned how to use the objects you get back from .NET.

Continue reading...
 
Status
Not open for further replies.
Back
Top