April 24, 2024, 06:09:27 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


IDE opening code a second time on compile error

Started by Andy, March 19, 2016, 07:37:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

I've noticed that when I'm compiling code, if I get a compile error for a line or lines of code -shown in red in the output window, that if I click on one of those highlighted red lines in the output  window instead of taking me to the line in question, it opens another copy of that code in the IDE and takes me to it there in the second copy.

If I don't watch for that I end up working on two copies of the same code.

This happens (but not every time), and applies to both single code and project compiles.

Thanks,
Andy.


Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Thanks Larry,

I can be a pain sometimes.

BTW, if you do find the problem and fix it - any chance you could set the focus of the "Create" button when you press F8 to create an exe file, so we can simply hit <Enter> instead of clicking on the button?

Anyway thanks,
Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

Quote from: Andy on March 20, 2016, 05:13:59 AM
Thanks Larry,

I can be a pain sometimes.

BTW, if you do find the problem and fix it - any chance you could set the focus of the "Create" button when you press F8 to create an exe file, so we can simply hit <Enter> instead of clicking on the button?

Anyway thanks,
Andy.

Yes ;)
That was an oversight from the very beginning.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

Quote from: Andy on March 19, 2016, 07:37:43 AM
I've noticed that when I'm compiling code, if I get a compile error for a line or lines of code -shown in red in the output window, that if I click on one of those highlighted red lines in the output  window instead of taking me to the line in question, it opens another copy of that code in the IDE and takes me to it there in the second copy.

If I don't watch for that I end up working on two copies of the same code.

This happens (but not every time), and applies to both single code and project compiles.

Thanks,
Andy.
When you get and error compiling can you copy the output window to the clipboard so that if the 2nd window opens up you can show me exactly what the text string of the of the output window looked like along with the displayed name of the duplicate file tabs.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Larry,

Yes, I will try to do that tomorrow and show you exactly what is happening.

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

Larry,

So far today I have been able to reproduce the error, but as soon as it does I will post you the required information.

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

March 25, 2016, 07:21:22 AM #7 Last Edit: March 25, 2016, 07:27:49 AM by Andy
Larry,

It happened today, attached is the contents of the output window.

I double clicked on:

File: C:\StringMap\ReadFile.iwb (62) Error: Cannot assign int to string (in the output window)

The IDE then opened a second copy of the program "ReadFile.iwb".

BTW - I did have my StringMap project open at the time, and to compile ReadFile.iwb I pressed F8 and clicked "Create".

I closed the project and compiled ReadFile.iwb again, double clicked on the same error and I got exactly the same issue as above.

Thanks,
Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

that provides a great deal of information
notice that the file that was already open appears as ReadFile in the tab and the error message but appears as readfile in the 2nd tab.

Why it doesn't do it ALL the time may be my real problem.

Thanks
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

I did notice the lowercase naming convention, and there is only one copy of the code in the folder.

It's a puzzle for sure.

It only happens sometimes, and these are the hardest to solve.

But don't knock yourself out over it, at least I am aware of it, so I take care as to which code I amend.

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

Well, at least I've duplicated it; but first some facts.
In the picture you posted the picture showed several facts I went on.
You had a file named ReadFile.iwb open
You compiled it and it had an error
You clicked on the error report line and it opened a new copy of the file readfile.iwb

The part the worked correctly is the opening of the file readfile.iwb
The problem is how a file named ReadFile.iwb actually appeared in a tab in the IDE.
And this has nothing to do with how the file name appears on the disk.

So my search was how do I get a filename with capital letters into the IDE tabs when it will only load a file after changing the name to lower case.  And that is done specifically so you can't load the same file twice which is what is happening.

As it turns out there are two ways to get file names with capital letters in the tabs in the IDE.
First, is to select the File/New menu option which will open a new blank file with the name IWBASICxx
2nd, is to select the File/Save As menu option and type in a new file name using one or more capital letters.

If you do either of the above (without closing and then reopening then file)
and then compile and generate an error in that file and click the error line in the output window to go to the error line it will ALWAYS open that 2nd copy.

So, now that I know what is going on I have to figure out exactly how I'm going to fix it.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

March 26, 2016, 01:06:41 AM #11 Last Edit: March 26, 2016, 01:21:37 AM by Andy
That's great detective work.

I've noticed that even if you use any capital letters in the file name, when you go to recent files it is shown in lowercase.

If you close the ide, and open it again, the file is loaded but it is in lowercase.

I went to the folder with windows explorer, looked for the file and windows stores it with the capital letters.

If you double click on the iwb file, it loads it into the IDE but again in lowercase.

So, at the moment, the problem only comes if you name a file with capital letters and have a compilation error before closing the IDE.

Once you've closed the IDE and opened it again, you don't have the problem as the file is loaded as lowercase, which is why (to me) the problem was intermittent.



Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

Resolving this problem is turning out to be a bear.  It may be that it's just that my mind is slowing down that much.
I'm having to mess with the inner workings of the SaveAs dialog plus the fact that I need it to work one way sometimes and a different way at other times along with all the stuff that is entwined around it.
There is nothing simple nor straight forward about it and it has now been years since I have had to  look at that code.


I haven't done too bad though.
The IDE hasn't compiled on this computer in 6 months.  The one that it will compile on is 1500 miles away with my son.
It has taken me two days to debug the code just to get this one where it would compile to the point I could use it. I started with no project list window and no output window.

Andy, I've also got your F8 Create button Enter key issue fixed so it will be in the next release.

So, I'll plug away a bit at a time till I get it.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy


Larry,

Thanks for fixing the F8 issue, will look forward to that in the next release.

Thought I've seen you burning the midnight oil, I think you are a little like me (and others on here) who just want something to work exactly as it should - and that can drive you crazy for sure.

Your work is greatly appreciated, just take your time and I'm sure you will find and fix the problem, for now we are aware of it, and we can keep a look out for it, so don't knock yourself out trying to fix it.

The fix will come when it comes.

Andy.





Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.