Quick 'reload file' option?

Bug reports, feature requests and other feedback.
Post Reply
MrFlow256
Posts: 15
Joined: Tue Sep 28, 2021 4:43 pm

Quick 'reload file' option?

Post by MrFlow256 »

Sorry for flood of requests, but the option to reload a file would be neat e.g. a right-click option, that retains custom variables and cursor/zoom as far as possible (I think it might already do this at least partially).

Re-running a simulation on the same input data I often rewrite the same file so this would be pretty useful. Working both on saved projects and just an ad-hoc open file would be great - I tend to open a simulation result and play with it, without saving/creating a project.
Waveworks
Posts: 167
Joined: Thu Sep 05, 2019 1:05 pm

Re: Quick 'reload file' option?

Post by Waveworks »

No worries, keep them coming! :) Flow is supposed to automatically reload files that were changed on disk whenever it regains focus, and formulas and view settings should be kept. Is it not working for you, or am I misunderstanding your request?
MrFlow256
Posts: 15
Joined: Tue Sep 28, 2021 4:43 pm

Re: Quick 'reload file' option?

Post by MrFlow256 »

Waveworks wrote: Tue Oct 05, 2021 7:20 am No worries, keep them coming! :) Flow is supposed to automatically reload files that were changed on disk whenever it regains focus, and formulas and view settings should be kept. Is it not working for you, or am I misunderstanding your request?
I hadn't noticed that but yes it does. Great :) It does sometimes have the same issue as NotePad++ which is that you have to deliberately lose and regain focus depending on how you work. So an explicit reload might still be cool, and possibly it should ask before auto-reloading in case you were doing something you didn't want to lose?

The other thing would be to make it obvious it HAS reloaded... as simple as writing "reloaded xxx.csv at <time>" in the log-panel at the bottom maybe?
Waveworks
Posts: 167
Joined: Thu Sep 05, 2019 1:05 pm

Re: Quick 'reload file' option?

Post by Waveworks »

MrFlow256 wrote: Tue Oct 05, 2021 8:56 pm I hadn't noticed that but yes it does. Great :) It does sometimes have the same issue as NotePad++ which is that you have to deliberately lose and regain focus depending on how you work. So an explicit reload might still be cool,
Hmm, that sounds like a bug, and I'd rather fix the bug first... So is the problem that the file is being written by an external tool while Flow is in focus, or that Flow simply fails to detect the file change when it regains focus, so you need to lose/regain focus again? Is it reproducible?
MrFlow256 wrote: Tue Oct 05, 2021 8:56 pm and possibly it should ask before auto-reloading in case you were doing something you didn't want to lose?
This should already work in Flow CSV Editor if you have unsaved changes, while in Flow CSV Viewer there should be nothing to lose on a reload. Or have I missed a case?
MrFlow256 wrote: Tue Oct 05, 2021 8:56 pm The other thing would be to make it obvious it HAS reloaded... as simple as writing "reloaded xxx.csv at <time>" in the log-panel at the bottom maybe?
That's a good idea - coming up in the next release! Thanks again for your feedback!
MrFlow256
Posts: 15
Joined: Tue Sep 28, 2021 4:43 pm

Re: Quick 'reload file' option?

Post by MrFlow256 »

I can think of two cases where changes might not get seen:

1. as you say, the file is rewritten while you're using Flow
2. if you're working in VMs, you might switch between 2 machines but Flow remains in focus the whole time. In software dev I often do this where I'm analysing logs or output from a different system to where my tools are installed, maybe over a network share drive or whatever.

I suppose you could check for updated files periodically as well as on-focus, but it's not hard to learn to alt tab a couple of times - this is probably not the normal workflow for most people.
I still think if I'm in the middle of looking at the actual data in a file and it gets overwritten, I might want to know first... possibly I might want to save a copy of my current CSV from Flow to a different filename? But it's a very minor thing.
Waveworks
Posts: 167
Joined: Thu Sep 05, 2019 1:05 pm

Re: Quick 'reload file' option?

Post by Waveworks »

I see. I think it should be possible to detect the file change event and reload immediately when Flow has focus - I'll look into that. And I could also add a setting for whether to reload automatically or to ask the user first.
Waveworks
Posts: 167
Joined: Thu Sep 05, 2019 1:05 pm

Re: Quick 'reload file' option?

Post by Waveworks »

Hello again, I have now released version 1.1.1 with multiple improvements to the handling of externally changed files. Please let me know if you still experience problems after the update!

Best regards,
Gustaf
Post Reply