IonicWind Software

IWBasic => IWB 2.5 Beta => The BoneYard => IWB 2.5 beta Development => Topic started by: LarryMc on May 06, 2013, 05:16:20 AM

Title: Info Only Update 05-06-2013
Post by: LarryMc on May 06, 2013, 05:16:20 AM
I hate it when I think I have a problem fixed and then discover it was a 100% fix.

While things were running through my head as I was going to sleep last night I had one of those moments.

The original reported problem was that when adding a tool to the tool menu the menu was updating until the IDE was restarted.

What was really happening was the tool was being added to the menu to the left. But when the IDE was reopened the addition was added to the correct menu.

My initial fix was to add a firstpass flag to add the tool to one menu index and after that to increment the menu index.

And that appeared to solve the problem.

What I figured out in my "pre-sleep" was that the difference was really whether or not a file was open in the IDE.
When the IDE is initially opened there are no open files at the time the menus are created.

From then on there may or may not be open files.

The obvious question is,"What difference does that make?"
When there is an open file the icon representing the file with the focus is displayed in the menu bar at the left end.
When  that icon is displayed it shifts the menu indexs to the right(increase by one).

So, my recent "fix" works only while there is at least one file is open.  If you close all the files and then add a tool it will show up in the menu to the right until you restart the IDE.

This problem is in the Tool and Help menus.

The fix will be to test for the active file; if there is one use one menu index and if not, use the other menu index.

The only reason I rattle on about this is to let people know what is going on in case they ever run into it in one of their programs.

This fix will be in the next update.