I want to download files from Start Date to End Date.
How can I pass these values to the Thread.Run ?
All I want is to get the TextFields dates contents.
I already extracted from the code the checks (if the TextFields are empty, etc.), but even:
Start_Date = Window1.TextField_Start_Date.Text // Rejected
Add some properties to the thread and store the values there before doing thread.run()
You’ll need to decide what sort of date value you need for use when looking at a file’s creation or modification date - probably a double containing seconds since the epoch, since that matches nicely with Xojo.IO.FolderItem’s ModificationDate property. So:
is then a value to compare with.
You’ll need to write your own function to take the date string in your textfield and convert that to seconds since the epoch.
I usually add another Run method to the thread that accepts the values, stores them in properties of the thread, and then calls the normal Run method.
I tried that and the property goes to the owning window
I do not talk about that. Usually I let the running OS dates.
The dates I was talking about were the dates of the downloaded images (yes, they have a released ate, and this is the other important thing with the image name and the image extension).
Ah, a second time ? So, I certainly was wrong when I tried to add a Property to the thread.
OK, I tried once more and the classes / properties / etc. falled into the window
BTW: I dropped the Thread into the design window area. Was it wrong ?
You must create a subclass of thread in order to do this.
Ok Tim, will do that. Thanks.