WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)

User projects written in or related to FreeBASIC.
Post Reply
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows

Post by PaulSquires »

Added to GitHub:

- Added: German localization file (deutsch.lang) compliments of Tom Dehn. Thanks!
ur_naz
Posts: 49
Joined: Mar 02, 2016 12:44

Re: WinFBE FreeBASIC Editor for Windows

Post by ur_naz »

Ukrainian and Russian Localization is here

http://fex.net/get/286993268088/877456
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows

Post by PaulSquires »

ur_naz wrote:Ukrainian and Russian Localization is here
http://fex.net/get/286993268088/877456
Thanks ur_naz! I really appreciate you providing these two translations. Awesome, thanks.
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: WinFBE FreeBASIC Editor for Windows

Post by sancho2 »

Is it too early for feature requests?
Feature suggestion:
This is what the function list looks like in FBEdit. WinFBE is similar except its a floating window.
Image
What the image shows is that once a project gets large, the function list fills up. You can see the scroll bar handle is small and there are dozens of functions listed. This is not much help and somewhat less than quick access.

It makes more sense to have a customizable function list.

When you are coding/debugging a system you are generally flipping back and forth through a handfull of procedures. So the thought is that if you could 'tack' the functions you are working with to a list and show those instead of all the functions.

I remember VB6 had a super easy key combination to jump back and forth to the last function you had the cursor in.
Visual Studio lets you use the mouse and click to get to the function definition; also very easy.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows

Post by PaulSquires »

Hi sancho, thanks for the ideas. Appreciate it. Not sure how I'd implement the customizable function list but I certainly understand how such a list could be beneficial given your situation of debugging, etc.

Here as what the popup function list looks like in WinFBE. it is a owner drawn, multicolumn, horizontal scrolling listbox. I find that using that approach is much more visual than the simple dropdown combobox of most editors. Functions are listed by open document.
Image
I remember VB6 had a super easy key combination to jump back and forth to the last function you had the cursor in.
WinFBE has something similar with the F6 and Shift+F6 keys (look under the "Search" menu).
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: WinFBE FreeBASIC Editor for Windows

Post by sancho2 »

Great thanks.
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: WinFBE FreeBASIC Editor for Windows

Post by sancho2 »

I see an issue with case conversion. ver 1.2.2
I have 'original case' selected in the settings, however the block completes always give uppercase keywords like END SUB and NEXT.

Would it be possible to change it to mixed case, End Sub etc.?
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows

Post by PaulSquires »

sancho2 wrote:I see an issue with case conversion. ver 1.2.2
I have 'original case' selected in the settings, however the block completes always give uppercase keywords like END SUB and NEXT.

Would it be possible to change it to mixed case, End Sub etc.?
Ah, good point. I will make the change. Thanks for noticing that. (I didn't see it because I use UPPERCAE for my keywords) :-)
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: WinFBE FreeBASIC Editor for Windows

Post by sancho2 »

Hello again:
A couple of things.

Tab works a little oddly. If you are at the left edge and press the TAB key, the cursor jumps to the first tab (col 3). Then if you press the HOME key and press TAB one more time it goes to the next tab (col 6).
If you keep repeating this it will always go to the last tab + 1. This makes it very difficult to line up your code.

Automatically appending the THEN to an IF statement, and leaving the cursor at the condition, actually makes life more difficult for the typer. After typing in the condition we have to then press the END key + ENTER to get the auto ENDIF. This makes little sense.
A better way would be to leave the THEN off until ENTER is pressed and then a quick check to see if THEN is there, and if not, then auto placed. If that can't be done, its my opinion the autocomplete should leave the THEN off.

Default conditions for IF statements, and procedure names for SUBS and FUNCTIONS are completely useless and just get in the road.

Remember that most of us are super fast keyboard guys.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows

Post by PaulSquires »

Thanks sancho, you make some very good points and observations. I will certainly look at these and tweak the code.
I am also considering the whole IF/THEN insertion because I find that a lot of times my IF/THEN's are single line and the insertion of the trailing END IF just ends up having to be manually deleted. That can get irritating.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows

Post by PaulSquires »

Updated first post of thread.

Version 1.2.2 is available via GitHub releases. https://github.com/PaulSquires/WinFBE/releases

Version 1.2.2 (February 2, 2017)
- Added: Find in Files functionality added.
- Added: Add "TODO" messages directly in code via 'TODO: or ' TODO: List shows in Output window / TODO tab.
- Added: New tab in Output window for "Notes". Notes are saved on a per project basis.
- Added: File Menu option to "Save Declares File". Auto generates a Declare file for all Sub/Functions that you can #Include into your project.
- Added: #Include files are now parsed for Sub/Function declaration Codetips.
- Added: ProgressBar in StatusBar during compiling progress.
- Added: Localization translations for Russian and Ukrainian compliments of ur_naz.
- Changed: Refined autocomplete insertions for SUB/FUNCTION/PROPERTY/TYPE/UNION.
- Fixed: Regression from v1.2.1 whereby cursor would not change to arrow during application start.
- Fixed: Loading Template did not increment the Untitled 1,2,3 .bas filename numbering.
- Fixed: Autocomplete insertions (eg. IF/THEN, FOR/NEXT) now honours the keyword casing as defined by the user.
VANYA
Posts: 1837
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: WinFBE FreeBASIC Editor for Windows

Post by VANYA »

Hi Paul!

There is a problem:

1) the editor does not compile if the file or path name is Cyrillic.
2) I cannot write in Cyrillic (in editor), if the file is encoded in ANSI . ANSI have multiple code pages, such as page 1251 allows you to write Cyrillic

It would be a good idea to create the ability to save files in the correct encoding in menu: (ANSI with different code pages, UTF16 , UTF-8) . Function MultiByteToWideChar allows you to convert in any encoding
rdhays82604
Posts: 14
Joined: May 19, 2011 11:43

Re: WinFBE FreeBASIC Editor for Windows

Post by rdhays82604 »

Paul

I am getting errors attempting to compile the example the example project MenuWithIcons.wfbe

The first thing I needed to do was to copy the 'afx' folder to my inc folders.

I get the following errors:
Line 104 : Variable not declared GET_WM_COMMAND_ID in SELECT CASE GET_WM_COMMAND_ID(wParam, lParam)
Line 107 : Variable not declared GET_WM_COMMAND_CMD in IF GET_WM_COMMAND_CMD(wParam, lParam) = BN_CLICKED THEN
Line 107 : Expected End-of-Line, found GET_WM_COMMAND_CMD in IF GET_WM_COMMAND_CMD(wParam, lParam) = BN_CLICKED THEN
Line 110 : Expected 'END SELECT', found 'END" in 'END IF'

Compiler Log File:
FreeBASIC Compiler - Version 1.05.0 (01-31-2016), built for win64 (64bit)
Copyright (C) 2004-2016 The FreeBASIC development team.
standalone
target: win64, x86-64, 64bit
compiling: C:\Users\*******\Programming\FreeBasic\WinFBE-master\Sample_Projects\MenuWithIcons\MenuWithIcons.bas -o C:\Users\*******\Programming\FreeBasic\WinFBE-master\Sample_Projects\MenuWithIcons\MenuWithIcons.c (main module)
C:\Users\*******\Programming\FreeBasic\WinFBE-master\Sample_Projects\MenuWithIcons\MenuWithIcons.bas(104) error 41: Variable not declared, GET_WM_COMMAND_ID in 'SELECT CASE GET_WM_COMMAND_ID(wParam, lParam)'
C:\Users\*******\Programming\FreeBasic\WinFBE-master\Sample_Projects\MenuWithIcons\MenuWithIcons.bas(107) error 41: Variable not declared, GET_WM_COMMAND_CMD in 'IF GET_WM_COMMAND_CMD(wParam, lParam) = BN_CLICKED THEN'
C:\Users\*******\Programming\FreeBasic\WinFBE-master\Sample_Projects\MenuWithIcons\MenuWithIcons.bas(107) error 3: Expected End-of-Line, found 'GET_WM_COMMAND_CMD' in 'IF GET_WM_COMMAND_CMD(wParam, lParam) = BN_CLICKED THEN'
C:\Users\*******\Programming\FreeBasic\WinFBE-master\Sample_Projects\MenuWithIcons\MenuWithIcons.bas(110) error 35: Expected 'END SELECT', found 'END' in 'END IF'

Is/are there file(s) I need to install? If so where do I find it/them?
Is/are there setting(s) I need to make?
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows

Post by PaulSquires »

rdhays82604 wrote:Paul

I am getting errors attempting to compile the example the example project MenuWithIcons.wfbe

The first thing I needed to do was to copy the 'afx' folder to my inc folders.

Is/are there file(s) I need to install? If so where do I find it/them?
Is/are there setting(s) I need to make?
Sorry, my apologies. I need to include instructions / help file information for running some of the sample programs.

You are correct, you need to copy the Afx folder to your FB install's "inc" folder. This way the compiler will look in your \inc\Afx\ folder for the correct include files.

The other errors are due to an incorrect windowsx.bi file that ships with FB. Use my version, called "windowsxx.bi" <-- notice the extra "x". Copy that file to your \inc\win\ folder and then modify Line 19 of the file AfxCtl.inc to reference the windowsxx.bi file rather than the windowsx.bi file.

Writing this out sounds more complicated than it really is. Basically, copy a folder, a file, and modify one file to point to the new file.

I will make this easier in future updates, basically instructing the user to copy the Afx folder to their \inc\ folder. I will correct the other stuff so you won't have to make manual modifications.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows

Post by PaulSquires »

VANYA wrote:Hi Paul!

There is a problem:

1) the editor does not compile if the file or path name is Cyrillic.
2) I cannot write in Cyrillic (in editor), if the file is encoded in ANSI . ANSI have multiple code pages, such as page 1251 allows you to write Cyrillic

It would be a good idea to create the ability to save files in the correct encoding in menu: (ANSI with different code pages, UTF16 , UTF-8) . Function MultiByteToWideChar allows you to convert in any encoding
Hi VANYA,

I would love to get this working for you. Hopefully you can help me because I do not have access to a Windows machine that uses Cyrillic. The editor allows you to use UTF-8. You can change the setting under "View \ Environment Options \ Code Editor" and tick the box for "Enable Unicode (UTF-8 encoding). You can also change that setting by simply clicking on the StatusBar where you see the word "ANSI". It will toggle to "UTF-8 (Unicode)".

You can also specify a codepage to use for your selected editor font. "View \ Environment Options \ Colors and Fonts".

If I knew what needed to be done to make this work for you then I will certainly modify the editor to get it working.
Post Reply