PlanetSquires Forums

Support Forums => PlanetSquires Software => Topic started by: Paul Squires on March 05, 2017, 06:57:41 PM

Title: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 05, 2017, 06:57:41 PM
I just uploaded the most up to date files to GitHub. To try these files simply download them by clicking on the green button called "Clone or Download". Then select "Download ZIP".

Too many changes to document. Multiple projects can now be opened at once within the editor. New Find/Replace functionality. Please let me know if you notice any major problems like crashing/GPF's.

https://github.com/PaulSquires/WinFBE

Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: José Roca on March 05, 2017, 08:26:14 PM
The explorer window needs a little more height for the "EXPLORER" caption.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: José Roca on March 05, 2017, 08:33:45 PM
After loading a second project, it doesn't allow me to change FBC 32 bit to 64 bit and CONSOLE to GUI by clicking the status bar. I can only change these settings for the first project loaded.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: José Roca on March 05, 2017, 08:43:54 PM
Problem with the icons in Find/Replace, at least at 192 dpi.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: José Roca on March 05, 2017, 08:53:38 PM
If I load a simple file, the status bar doesn't display the settings of the compiler and the gui/console. It also doesn't let me to change them using the menu or the keyboard shortcuts.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 05, 2017, 09:50:14 PM
Thanks Jose, I will fix those problems ASAP. I know about the icon issue at high DPI. I need to create additional icon sizes or use PNG. I wanted to gt the basic Find/Replace working before trying my hand at graphics  :)
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 05, 2017, 11:00:00 PM
Hi Jose, I have uploaded new code with fixes for what you have reported. Still need to create icons or png for higher DPI's.

Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: José Roca on March 05, 2017, 11:56:12 PM
I like the idea for the new Find/Replace.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: José Roca on March 06, 2017, 12:13:48 AM
I have noticed that the font used in the find/replace dialog is a point bigger than for the other UI elements. Is it intentional?

Dim As HFONT hFont = pWindow->CreateFont("Segoe UI", 10)

Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: José Roca on March 06, 2017, 12:33:49 AM
There is something wrong with the margins. If I uncheck the option to show the left margin and check the option to show the fold margin, when I restart the editor it doesn't display the fold symbols.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Tasos Georgas on March 06, 2017, 04:14:44 AM
It crashes if you try to compile a just opened project without any active tab. See photo.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 06, 2017, 01:11:31 PM
Quote from: Jose Roca on March 06, 2017, 12:13:48 AM
I have noticed that the font used in the find/replace dialog is a point bigger than for the other UI elements. Is it intentional?

Dim As HFONT hFont = pWindow->CreateFont("Segoe UI", 10)


I can't think of a reason other than maybe I thought a larger font would "fit" better in the textbox. What I would like is to have the text in the Find and Replace textboxes to be centered vertically within the textbox. I think I have code that does that but I need to see if it actually works and how complicated it would be to implement.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 06, 2017, 01:13:36 PM
Quote from: Tasos Georgas on March 06, 2017, 04:14:44 AM
It crashes if you try to compile a just opened project without any active tab. See photo.
Thanks Tasos, you're right indeed it does appear to GPF. I'll fix that.

EDIT: I have fixed this. Changes will be uploaded to GitHub later this evening. In modCompile.inc there were two lines that had incorrect logic for testing the value of pDoc:

Line: 318
if pDoc = 0 THEN SendMessage( pDoc->hWindow, SCI_SETCURSOR, SC_CURSORWAIT, 0 )
Should be:
if pDoc THEN SendMessage( pDoc->hWindow, SCI_SETCURSOR, SC_CURSORWAIT, 0 )

Line: 342
if pDoc = 0 THEN SendMessage( pDoc->hWindow, SCI_SETCURSOR, SC_CURSORNORMAL, 0 )
Should be:
if pDoc THEN SendMessage( pDoc->hWindow, SCI_SETCURSOR, SC_CURSORNORMAL, 0 )


Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 06, 2017, 02:41:12 PM
Quote from: Jose Roca on March 06, 2017, 12:33:49 AM
There is something wrong with the margins. If I uncheck the option to show the left margin and check the option to show the fold margin, when I restart the editor it doesn't display the fold symbols.

This appears to be related the issue I wrote about in the "TOFIX.TXT" text file.

Quote
(1)
The fold margin doesn't always display the folding icons.
To replicate this issue load a large code file with many folding sections. Go to the view menu and environment options. Unselect to show left margin and close the options window. Scroll down your code and you will see that the code folding icons are missing. Select show left margin again and they will appear.

I don't think it is related to the way that I have implemented the code in clsDocument.ApplyProperties (Lines 950 to 978) but you never know. Could also be related to the way the lexer was implemented in the version of the Scintilla DLL that I am using?
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 06, 2017, 06:02:48 PM
Just uploaded most recent source files and exe's to GitHub repository.
As an aside, using GitHub is so incredibly easy. So happy that I decided to use it for this project.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: José Roca on March 06, 2017, 11:29:55 PM
Seems like it is not possible to compile a single file if you have loaded a project at the same time.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 06, 2017, 11:49:35 PM
That's right. Once a project is loaded, it takes precedence over all compiling. You can not have single files and projects open at the same time. You can have Files or Projects but not both.

Let me think about it. Maybe I can change the logic but I set it up initially so that it would be Files or Projects.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: James Klutho on March 07, 2017, 11:01:09 AM
Paul - I haven't tried version 1.2.5 (still on 1.2.4)  and WinFBE works pretty well for me.  The only issue I have in my workflow is the the Function List fails to update itself consistently.  In fact I see no pattern in its updating.  If I add or subtract, rename a sub/function etc., the update is not recognized.  Even adding lines to various functions will throw off the target line on other sub/functions.  Even closing a project and reopening it does not appear to update the Function List target lines.  I have been working in projects.

I don't know if your intent is have Function List auto update its target lines when opening the dialog (which appears not the case) or whatever.  When I used Jellyfish for PB I don't remembering this to be an issue.  A simple "Refresh" button in the Function List dialog would be stop gap solution if there are other issues keeping the target lines auto-updated.

Thanks
Jim
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 07, 2017, 11:54:05 AM
Hi Jim, thanks for the update. I will certainly look into it. I believe that the list updates now when the source file is Saved, so if you are typing or editing long amounts of code and don't save during that time then the line offsets will be thrown off. Later on I will modify that behaviour and have the file parsing monitored through threads but for now the easiest way was to update it when a save was initiated by the user.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: James Klutho on March 07, 2017, 01:29:37 PM
The save did the trick.  What is subtle is that the files are all saved upon compiling.  But if you explicitly save from the menu, the Function List gets refreshed.  Thanks Paul.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 07, 2017, 04:14:38 PM
Quote from: TechSupport on March 06, 2017, 02:41:12 PM
Quote from: Jose Roca on March 06, 2017, 12:33:49 AM
There is something wrong with the margins. If I uncheck the option to show the left margin and check the option to show the fold margin, when I restart the editor it doesn't display the fold symbols.

This appears to be related the issue I wrote about in the "TOFIX.TXT" text file.

Quote
(1)
The fold margin doesn't always display the folding icons.
To replicate this issue load a large code file with many folding sections. Go to the view menu and environment options. Unselect to show left margin and close the options window. Scroll down your code and you will see that the code folding icons are missing. Select show left margin again and they will appear.

I don't think it is related to the way that I have implemented the code in clsDocument.ApplyProperties (Lines 950 to 978) but you never know. Could also be related to the way the lexer was implemented in the version of the Scintilla DLL that I am using?


As usual, this looks like it was my error. in clsDocument.ApplyProperties Line 1139, when setting the fold properties I was testing for LeftMargin being active rather than FoldMargin.

Simply needed to change line 1139 to:

   If gConfig.FoldMargin Then

The fix will be in the next GitHub update.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 07, 2017, 04:17:26 PM
Quote from: James Klutho on March 07, 2017, 01:29:37 PM
The save did the trick.  What is subtle is that the files are all saved upon compiling.  But if you explicitly save from the menu, the Function List gets refreshed.  Thanks Paul.
Yes that's correct. There is an option that you can toggle under "General Options" under "Environment Options" that determines whether to autosave files prior to compiling.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 07, 2017, 10:41:45 PM
GitHub updated
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Tasos Georgas on March 08, 2017, 03:22:24 AM
Hi Paul.
When I try to open a *.bi file from "C:\FreeBASIC\inc\win" location, few of them do not open. The editor is "Not Responding".
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 08, 2017, 09:35:58 PM
Quote from: Tasos Georgas on March 08, 2017, 03:22:24 AM
Hi Paul.
When I try to open a *.bi file from "C:\FreeBASIC\inc\win" location, few of them do not open. The editor is "Not Responding".

I am pretty sure that this is a case of the editor failing by trying to parse too many Windows include files through recursion. My plan is to prevent WinFBE from parsing the Windows Include files because I will create a set of pre-parsed Windows api files that will load depending on whether UNICODE is active or not. Sorry that the editor is blowing up currently with certain api files.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 10, 2017, 04:47:16 PM
Quote from: TechSupport on March 08, 2017, 09:35:58 PM
Quote from: Tasos Georgas on March 08, 2017, 03:22:24 AM
Hi Paul.
When I try to open a *.bi file from "C:\FreeBASIC\inc\win" location, few of them do not open. The editor is "Not Responding".

I am pretty sure that this is a case of the editor failing by trying to parse too many Windows include files through recursion. My plan is to prevent WinFBE from parsing the Windows Include files because I will create a set of pre-parsed Windows api files that will load depending on whether UNICODE is active or not. Sorry that the editor is blowing up currently with certain api files.


I will run more tests on this tonight because it appears that it is getting into an endless loop rather than it being a recursion issue.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 11, 2017, 07:33:05 PM
Quote from: TechSupport on March 10, 2017, 04:47:16 PM
Quote from: TechSupport on March 08, 2017, 09:35:58 PM
Quote from: Tasos Georgas on March 08, 2017, 03:22:24 AM
Hi Paul.
When I try to open a *.bi file from "C:\FreeBASIC\inc\win" location, few of them do not open. The editor is "Not Responding".

I am pretty sure that this is a case of the editor failing by trying to parse too many Windows include files through recursion. My plan is to prevent WinFBE from parsing the Windows Include files because I will create a set of pre-parsed Windows api files that will load depending on whether UNICODE is active or not. Sorry that the editor is blowing up currently with certain api files.


I will run more tests on this tonight because it appears that it is getting into an endless loop rather than it being a recursion issue.


I finally figured out the problem. The fixes will be in the next round of GitHub updates. I have also changed the entire way of handling internal data that is found during the parsing of the source code files. Created a simple data handling source code file called modDB.inc that will be included in the next update. No more using the clsFastHash.inc code.
Title: Re: WinFBE v1.2.5 Preview (March 5, 2017)
Post by: Paul Squires on March 11, 2017, 09:05:26 PM
GitHub updated with latest code. Many, many, many internal changes with this version. Next step is to modify the parser more and in particular, to identify DIM'd variables so that I can present popup autocomplete listbox selector for TYPE elements.