> Le 18 janv. 2020 à 12:18, Christian Schmitz <supp...@monkeybreadsoftware.de> > a écrit: > > Dim o As New OpenDialogMBS > > Dim f As FolderItem = o.files(1) > Dim fi() As FolderItem = o.files > > > This compiles fine here.
I confirm: your example doesn't compile on my side (same error). > Ah, maybe your plugins are too old as Files is new function in v20.0 to > return array. I actually told about that fact in my original message. While it's not a “too old” version, it's indeed the one just before 20.0 that I'm using right now. As I mostly keep Xojo open, I usually install new plugins when I restart my computer (or Xojo crashes); this can delay for weeks. So, before 20.0, only the “Files” function that doesn't return an array existed, I think. A proof of that is in Xojo, autocomplete shows only one “Files” method and the “status bar” shows the (index as integer) variant. Isn't it confusing for some people that the documentation lists all current items even when the user might be using an earlier version? Wouldn't be, for example, a popup menu to select our “current” version a suitable option? > We do have two methods there and one takes integer: > > Files(index as integer) as FolderItem > Files as FolderItem() > > The reason is simply. If we just have one giving array, you can't get the > array and directly use it without putting it in a variable. Indeed, both are useful. If “Files” was a property rather than a method, I guess the former version (“Files(index as integer) as FolderItem”) would be useless (one would do “f=o.Files(0)” with the array); only one version would be needed, then. I'm wrong? Thanks. _______________________________________________ mbsplugins@monkeybreadsoftware.info mailing list %(list_address)s https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info