PlanetSquires Forums

Support Forums => WinFBE - Code Editor and Visual Designer => Topic started by: Michael Stefanik on April 23, 2021, 07:58:02 PM

Title: WinFBE 2.2 Suggestions
Post by: Michael Stefanik on April 23, 2021, 07:58:02 PM
Hi Paul, I've been porting our header files to FreeBASIC as a side project, and have been working with WinFBE to write some test programs. You've done a really nice job with this, congratulations!  I ran into a few issues and had some thoughts about improvements (I also might be missing something that's already there, and I just haven't seen the option or it may be an issue specific to FB). This is with the latest and greatest build.

A few things that caught me by surprise on first install:

1. I tend to install everything under C:\Program Files\ (or C:\Program Files (x86)\ depending) and was surprised to see that it wouldn't work there. It's not a huge thing, but that's the standard "secure" folder that has restricted permissions, so if there's a way to make that work and the AppData folder to store anything that needs to be created/modified would be great. In the interim, it might be a good idea for your installer to check the install path provided by the user and let them know it can't be in a folder who's name contains whitespace.

2. The Check for Updates option seemed to work pretty sporadically for me. It would be successful sometimes, other times it would just hang the IDE or return a "Failed to retrieve update information" error. I had an active Internet connection at the time, but it might be a good idea to double check that, and perhaps perform the check using a worker thread so it doesn't block the UI thread.

3. When doing a replace all, following that with a Ctrl+Z doesn't undo all of the changes made, only the last one.

4. When searching, preforming subsequent searches with F3 often doesn't work, or when it did, it would actually search on the previous keyword/phrase, not the current one. That was pretty strange and I haven't found a way to make that 100% reproducible, but I've had it happen a number of times. Often, F3 just did nothing and I had to use the arrows in the mini search window.

5. Ctrl+H inserts a control character into the source. I know by default you're using Ctrl+R, but in most editors I've worked with these days (Notepad++, Visual Studio, Visual Studio Code, etc.) Ctrl+H pulls up the find/replace window. Might want to think about mapping that. I'm not sure there's a real world case where you'd want to insert backspace control characters into source code. May at least want to consider making that behavior optional.

6. The Win32 API reference that's included is positively ancient (talking APIs back in the prehistoric days of Windows 95/NT). Instead of just using that HTML Help file perhaps an option to specify a link to the current online docs from Microsoft (e.g.:

7. Widen the width of the font name selector. I noticed this because I use the "JetBrains Mono NL Medium" font for source code editing, and the dropdown provided is too small to show the complete name, so I had to guess which one I was actually picking (there's a variety of "JetBrains Mono" font styles, some with ligatures, others without).

8. When selecting a control from the toolbox and then just clicking on a form (not "drawing" it), it creates a control with a height and width of 0. Might want to have it default to something that makes it a bit easier to adjust (e.g.: 40x100 for a button). Could also make that configurable in the IDE, but at least not 0x0.

Some more cosmetic and quality-of-life suggestions, in no particular order:

1. On first open, the IDE sizes itself to the full display. On larger, modern displays I think this is a bit distracting. Perhaps consider a maximum size value on first startup. But again, that could just be me and it's purely a visual, not functional, thing.

2. Default to the location for the x86 and x64 compilers on first install. I had to manually set those, and that was a bit of a surprise.

3. The ability to search using regular expressions.

4. The ability to "replace all" in all files in the project, or just those files which are open.

5. An option in "find in files" to exclude files with binary content; that just makes it easier to do a global replace, but not attempt to match anything in binary resources like images, icons and so on.

6. Support for expanding environment variables in command line options, before you pass them off to the FB compiler. This would allow for paths like "%AppData%\Foo\Bar" or "%HOMEPATH%\src\inc" and help make projects more portable. An alternative syntax for that which is also popular is $(EnvVarName) and that's use with Visual Studio.

7. The ability to snap the toolbox to the IDE.

8. If you select Run Executable (Shift+F5) and any of the source code has changed since the executable was last built, provide an option to ignore (current behavior), warn, or automatically compile and run (same as F5) but only if there's been a change.

9. When double-clicking a control in design view, automatically switch to the code view for the default event handler for that control (e.g.: the _Click handler if it's a button).

10. When double-clicking an event in the toolbox, automatically enable that event, create the placeholder (if needed) and switch to that event in the code view.

11. The ability to set the default control font name and size for all controls created for that project, rather than always defaulting to Segoe UI 9pt.

12. Saving the build type (e.g.: Win32 GUI Debug) with the project and switch to that when the project is opened, rather than having it being application wide for the IDE.

Title: Re: WinFBE 2.2 Suggestions
Post by: Paul Squires on April 23, 2021, 09:23:17 PM
Hi Mike, great to see you around here again and thank-you so much for the great list of suggestions. I have copied all of them into my working to-do list and I will work through them with an eye to implement as many of them as I can before the next update.

I can quickly comment on a couple:

I only just recently implemented the Windows Installer. I know about the AppData scenario because I had to do the same with my old FireFly Visual Designer installer. This is just a case of trying to provide a quick install method for those users adverse to the whole unzipping archives to install a program approach. I have to do some internal work to get the config files, etc to default to the AppData folder. I will get there eventually. However, the larger problem is that the "Program Files" folder contains spaces and the current gcc toolchain that I am using seems to choke at the linker stage when it deals with paths with spaces. I have struggled with this problem for some time even attempting to convert long file paths to short, etc. I decided to let the issue rest for a while and come back to it at a later time with the caveat that in the meantime users should install WinFBE into non-secure areas and with non-space file paths.

You specified a number of quality of life improvements that should be easy for me to implement. Thanks!

The default compiler paths normally would have been pre-filled on first use of the program. This was always the case but I recently changed the backend toolchain and forgot to update the default config compiler paths. Silly oversight on my part.

If you come across anything else that you would like to see added, changed, deleted then please let me know.

Lately, I have been trapped into the Linux world, doing a lot of work there so my Windows time has suffered. I will dedicate more time to polishing WinFBE.  :-)

Title: Re: WinFBE 2.2 Suggestions
Post by: Michael Stefanik on April 23, 2021, 09:35:35 PM
Sounds great, and thanks for all of your work. I'm liking FreeBASIC as an alternative for BASIC development on Windows and it's been fairly straight-forward to convert our header files to use their syntax. Once I get things in a happy place, I'll make them available along with the PowerBASIC headers and examples we already include.

If anyone out there is using SocketTools and wants to give the translated headers a test drive, I can make them available.
Title: Re: WinFBE 2.2 Suggestions
Post by: Jim Dunn on April 24, 2021, 11:18:19 AM
<quote>I tend to install everything under C:\Program Files\ (or C:\Program Files (x86)\ depending) and was surprised to see that it wouldn't work there</quote>

Now this is funny.  I love SocketTools (yes, proud owner) but I never ever install anything under C:\Program Files.

I have a D:\Programs and everything goes there.  This way I can format/reinstall Windows on the C: drive without worry.

Well, I still worry...  : )
Title: Re: WinFBE 2.2 Suggestions
Post by: Michael Stefanik on April 24, 2021, 01:55:59 PM
I used to do that as well (install everything under D:\Tools) but over the years I've learned that wasn't particularly useful for me because the devtools I use need to be completely reinstalled anyway. Even if I installed Visual Studio elsewhere, for example, reinstalling Windows would mean reinstalling all of it anyway because of all of the registry settings and so on.

So, these days, I just have a big NVMe drive and stage platform-specific development tools in virtual machines. If I have to nuke and reinstall the host OS, then it's not too painful.
Title: Re: WinFBE 2.2 Suggestions
Post by: Josť Roca on April 24, 2021, 02:31:29 PM
Linux binutils ported to Windows have problems with spaces and non ascii characters.

See this thread:
Title: Re: WinFBE 2.2 Suggestions
Post by: Bumblebee on April 24, 2021, 09:57:30 PM
On this computer, FBE is installed in C:\ProgramData
If this is not recommended, let me know.
Title: Re: WinFBE 2.2 Suggestions
Post by: jermy on April 26, 2021, 06:36:16 PM
I don't know if everyone is bothered by this.
When opening WINAPI Help file it crashes sometimes, it takes WinFBE with it.
if there are winfbe help files open (winfbe editor help for example), it will not get the focus if chosen again from help menu.
Title: Re: WinFBE 2.2 Suggestions
Post by: Michael Stefanik on April 28, 2021, 01:50:30 PM
A few additional suggestions:

The ability to open/close/create new projects after one has been opened. So under the File menu, Open Project, Create Project, Save Project As options. Right now, you're forced to close the IDE and open a new instance to open a different project.

The ability to set default options for all new projects created, based on the type of project.

Title: Re: WinFBE 2.2 Suggestions
Post by: Bumblebee on April 28, 2021, 04:27:21 PM
Project > Close Project doesn't work for you? Or do you mean to relocate it under the File menu?
Title: Re: WinFBE 2.2 Suggestions
Post by: Michael Stefanik on April 28, 2021, 04:42:51 PM
You know, you're absolutely right. I didn't even notice those project menu items there. I'm a long-time Visual Studio user and I'm used to it being for things like adding new items to a project, setting up dependencies and build orders, that sort of thing. All of the "project file" related things are under the File menu in VS. So consider that to be my personal rut and ignore accordingly.

Title: Re: WinFBE 2.2 Suggestions
Post by: Bumblebee on April 29, 2021, 01:01:37 AM
As a former VB6 user, I'm used to Project related stuff being in the File menu. Old habits die hard.