Hi everyone,
I’m working with LiveCode (native standalone, not HTML5), and I’m trying to retrieve the modification date of files programmatically.
I’m using the files() function in its detailed (long) form, which should return several attributes including the modification date.
However, while this works correctly in the IDE, in the standalone application the modification date field seems unreliable or sometimes incorrect.
So my questions are:
Is there a known issue with retrieving file modification dates using files() in a native standalone?
Is there a more reliable way to get the modification date of a file in LiveCode?
Are there platform-specific differences (Windows / macOS) that I should be aware of?
For context, I’m mainly testing on macOS and Windows.
Any help or clarification would be greatly appreciated.
Thanks in advance!
File modification date unreliable in standalone (files() function)
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
Emily-Elizabeth
- Posts: 185
- Joined: Mon Jan 03, 2022 7:10 pm
- Contact:
Re: File modification date unreliable in standalone (files() function)
If it works in the IDE, it should work in the standalone. This sounds like a bug. What are you seeing different? Can you post a sample stack?
Re: File modification date unreliable in standalone (files() function)
I agree.
A standalone is just (oversimply) the engine bundled with a stack. There have been questions of this sort raised before, and the issue was never that something in the way a stack works in the IDE and the way it works as a standalone was the culprit.
As Emily suggested, can you show us what is going on?
Craig
A standalone is just (oversimply) the engine bundled with a stack. There have been questions of this sort raised before, and the issue was never that something in the way a stack works in the IDE and the way it works as a standalone was the culprit.
As Emily suggested, can you show us what is going on?
Craig
Re: File modification date unreliable in standalone (files() function)
While a bug seems possible, I'd have thought it would have been reported by now, and I can see no entries in the bug database about 'modification date'. So while not impossible it seems very unlikely this is a bug (keeping in mind 'the files' was introduced in version 1), it's possible your code is at fault.
Sometimes in situations like this I create a minimal stack that only does the one function that doesn' work as expected, to remove unexpected interactions with other code. Have you tested in IDE and standalone with such a minimal stack?
Please do consider posting your code...
Sometimes in situations like this I create a minimal stack that only does the one function that doesn' work as expected, to remove unexpected interactions with other code. Have you tested in IDE and standalone with such a minimal stack?
Please do consider posting your code...
