The contents of a source/header files imported via right click context menu are immediately deleted by UECIDE. UECIDE version is 0.8.9-pre16. Is this a bug?
This certainly sounds like a bug to me....
I can't immediately replicate it though. What OS are you using, and what exact steps are you taking to cause it? Is this on an existing sketch, or a new, unsaved sketch? Is it a sketch you opened, or a new one you saved? At what point in the sequence do you import the file? When exactly does the content vanish?
Can you provide a step-by-step sequence that reliably replicates the problem?
Thank you for your help. This happens on Windows 10 x64 version 1703. To replicate open the attached sketch. Use UECIDE to open the sketch. Copy import_this_file.h from "New Folder" into the sketch folder. Then in UECIDE right click on Headers folder in Project browser and click import header file. If you double click on import_this_file.h it will be shown as empty.
Ah, you're manually copying the file into the sketch folder first, then importing it? Yes, that'll break it. The import copies it into the folder for you - no need to place it there yourself. If you copy it manually you should just hit the refresh button at the top of the tree panel and it should appear in the list.
By importing it into the sketch folder when it's already in the sketch folder UECIDE will create a new file over the top of it to copy the content into - which is now empty because it just opened a new file on top of it...
Matt, thanks for clarification. Problem solved.
I guess I should add a trap to look if the source and destination files are the same - if they are then flag up an error.
Ok, the next version of UECIDE will complain if the files are the same. Should help clear up the confusion in future.