UECIDE deletes the contents of the imported header/source files

Asked by ntronics at 09:21 on 28 Jul 2017.

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?

Sign up or log in for live updates and to post messages.

This certainly sounds like a bug to me....

Posted 29 Jul 2017, 13:03, 0 votes
matt
Rating: 3

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?

Posted 29 Jul 2017, 13:11, 0 votes
matt
Rating: 3

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.

Posted 31 Jul 2017, 15:53, 0 votes
ntronics
Rating: 0

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...

Posted 31 Jul 2017, 16:02, 0 votes
matt
Rating: 3

Matt, thanks for clarification. Problem solved.

Posted 01 Aug 2017, 08:13, 0 votes
ntronics
Rating: 0

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.

Posted 01 Aug 2017, 09:40, 0 votes
matt
Rating: 3

Ok, the next version of UECIDE will complain if the files are the same. Should help clear up the confusion in future.

Posted 01 Aug 2017, 10:11, 0 votes
matt
Rating: 3

This site uses cookies to maintain your current login session and improve your browsing experience. By continuing to use this site you agree to the placing of these cookies on your computer or device.

About cookies | Close this popup