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
cbruce
Posts: 163
Joined: Sep 12, 2007 19:13
Location: Dallas, Texas

Re: WinFBE FreeBASIC Editor for Windows (Updated September 27, 2017)

Post by cbruce »

Hi Paul,

A couple of things...

Accidentally did a [Quick Run] and after that it continued to launch a CMD and run the program even though I was doing a [Rebuild All] or [Compile] - even after exiting WinFBE and restarting it.

I don't remember what it was in the WinFBE.ini file - but when I diff'd it with a saved version, there was something different in the [Builds] section. So I just overwrote with my saved INI file and the regular compiles were good again.

I also had a WinFBE issue that required a process kill to exit. This error has happened a couple of times. I *think* my steps were:
  • * Had a project opened with its files.
    * Did a [File Open] on file "X" that I just wanted to compare to a file in the project... I did NOT do a [Project][Add files to Project].
    * Made some changes to some of the project's files - [Ctrl-S]'d them as I went along.
    * Made some changes to file "X" - [Ctrl-S]'d it as I went along.
    * Occasionally did a [Project][Save Project].
    * Closed file "X".
    * Made some changes to some of the project's files - [Ctrl-S]'d them as I went along.
    * Tried to do a [Project][Save Project].
    * Error dialog:
    .. File Changed:
    .... File "X"
    .... This document has been deleted or is no longer available. Do you wish to keep the file open in the editor?

    * Clicked on [No].
    * Kept getting error dialog...
    * Tried clicking [Yes] - tried clicking [No].
    * Kept getting error dialog...
    * Any click on WinFBE gave the error dialog again.
    * Killed WinFBE process.
    * Launched WinFBE.
    * Opened project.
    * ... Back to the error dialog.
    * Killed WinFBE process.
    * Deleted "myproject.wfbe" file.
    * Recreated project and everything was good again.
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows (Updated September 27, 2017)

Post by PaulSquires »

Thanks for the bug report, greatly appreciated.

I have not been able to reproduce the QuickRun problem but I will continue to try different combinations. I did notice that the QuickRun menu option was enabled whenever a Project was active. That is a mistake and I have fixed it. The Toolbar icon was correctly disabled but the menu entry was active. QuickRun should never be allowed to execute for a Project.

The "File deleted..." message problem that you reported is indeed a bug. I am working on a fix and will have it in the next update.

Thanks!
cbruce
Posts: 163
Joined: Sep 12, 2007 19:13
Location: Dallas, Texas

Re: WinFBE FreeBASIC Editor for Windows (Updated September 27, 2017)

Post by cbruce »

Paul, here's another one that's been messing with me for a long time:

Version 1.5.9 64-bit... Working with multiple files/tabs... have a Find/Find-Replace dialog open...

If you don't ... ... ... pause ... ... ... when clicking between file tabs - the tabs end up changing positions - just like you're dragging them to new positions on purpose - only you're not.

Nothing really bad... just really confusing at times... (well, so confusing that if I have to make changes across the multiple files, I bring them up in AkelPad to do that).

Thanks!
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows (Updated September 27, 2017)

Post by PaulSquires »

I fixed the "File deleted" problem and it will be in the next update.

The tabs across the top of the screen are meant to be dragged. This allows you to rearrange the tab order by dragging them. I see your point though.
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows (Updated April 19, 2018)

Post by PaulSquires »

First post updated with v1.6.0.

Version 1.6.0 (April 19, 2018)
- Added: italian.lang lanuage file thanks to Massimiliano Argenti from the PlanetSquires forum.
- Added: czech.lang lanuage file thanks to Norcom (Robert) from the PlanetSquires forum.
- Fixed: QuickRun in top menu now correctly disabled when a Project is active.
- Fixed: Endless loop if file remained opened in editor but deleted manually from disk.
- Fixed: Corrected instances where the Autocomplete popup list would appear when it should not.
- Fixed: Corrected saving/restoring Explorer width when moving between high/low resolution monitor settings.
kcvinu
Posts: 232
Joined: Oct 07, 2015 16:44
Location: Keralam, India

Re: WinFBE FreeBASIC Editor for Windows (Updated April 19, 2018)

Post by kcvinu »

Hi,
How to trigger autocomplete in WinFBE ? Now, if type "dec" i am expecting "Declare" to come up as intellisence but not happening. Do i need to change any options ? Enable Autocomplete is ticked in Code Editor options.
cbruce
Posts: 163
Joined: Sep 12, 2007 19:13
Location: Dallas, Texas

Re: WinFBE FreeBASIC Editor for Windows (Updated April 19, 2018)

Post by cbruce »

.
kcvinu, WinFBE's autocomplete is not intellisense...

WinFBE will autocomplete a block structure for you... type:
DO<enter>
...and an indented blank line and the closing "LOOP" gets entered automatically for you, etc.

It will also show you a parameter list for built-in FB functions as you type (only as you type the opening parentheses - after that you're on your own). [smile]

And it will give a drop down list of datatypes when you are doing a DIM AS.

Hope that helps.
.
cbruce
Posts: 163
Joined: Sep 12, 2007 19:13
Location: Dallas, Texas

Re: WinFBE FreeBASIC Editor for Windows (Updated April 19, 2018)

Post by cbruce »

.
Is there a way to get the actual fbc.exe compiler command line that WinFBE is generating to compile my program?

I don't think there is an existing option anywhere for that is there?

Thanks!
.
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows (Updated April 19, 2018)

Post by PaulSquires »

cbruce wrote:.
Is there a way to get the actual fbc.exe compiler command line that WinFBE is generating to compile my program?

I don't think there is an existing option anywhere for that is there?

Thanks!
.
No, sorry. I don't think there is any built in way where the actual compile commands are displayed. The main routine fr initiating the compile is RedirConsoleToFile which is in the modCompile.inc file. That routine uses CreateProcess to invoke the compiler and pass it the necessary options. CreatePipe is used to capture the console screen output in order to react to compile errors, etc.
kcvinu
Posts: 232
Joined: Oct 07, 2015 16:44
Location: Keralam, India

Re: WinFBE FreeBASIC Editor for Windows (Updated April 19, 2018)

Post by kcvinu »

@cbruce,
Thanks for the reply. So, you mean, WinFBE wont give you a list of variable names as intellisence when you type the starting letters ?
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows (Updated April 19, 2018)

Post by PaulSquires »

kcvinu wrote:@cbruce,
Thanks for the reply. So, you mean, WinFBE wont give you a list of variable names as intellisence when you type the starting letters ?
No, it doesn't do that.
pingyu
Posts: 6
Joined: Aug 27, 2007 15:01

Re: WinFBE FreeBASIC Editor for Windows (Updated April 19, 2018)

Post by pingyu »

When I open a file contain too long line,WinFBE get crash.
like this:

Code: Select all

TYPE Afx_IOPCServer_ EXTENDS Afx_IUnknown
   DECLARE ABSTRACT FUNCTION AddGroup (BYVAL szName AS WSTRING PTR, BYVAL bActive AS LONG, BYVAL dwRequestedUpdateRate AS ULONG, BYVAL hClientGroup AS ULONG, BYVAL pTimeBias AS LONG PTR, BYVAL pPercentDeadband AS SINGLE PTR, BYVAL dwLCID AS ULONG, BYVAL phServerGroup AS ULONG PTR, BYVAL pRevisedUpdateRate AS ULONG PTR, BYVAL riid AS GUID PTR, BYVAL ppUnk AS IUnknown PTR PTR) AS HRESULT
   DECLARE ABSTRACT FUNCTION GetErrorString (BYVAL dwError AS HRESULT, BYVAL dwLocale AS ULONG, BYVAL ppString AS WSTRING PTR PTR) AS HRESULT
   DECLARE ABSTRACT FUNCTION GetGroupByName (BYVAL szName AS WSTRING PTR, BYVAL riid AS GUID PTR, BYVAL ppUnk AS IUnknown PTR PTR) AS HRESULT
   DECLARE ABSTRACT FUNCTION GetStatus (BYVAL ppServerStatus AS tagOPCSERVERSTATUS PTR PTR) AS HRESULT
   DECLARE ABSTRACT FUNCTION RemoveGroup (BYVAL hServerGroup AS ULONG, BYVAL bForce AS LONG) AS HRESULT
   DECLARE ABSTRACT FUNCTION CreateGroupEnumerator (BYVAL dwScope AS tagOPCENUMSCOPE, BYVAL riid AS GUID PTR, BYVAL ppUnk AS IUnknown PTR PTR) AS HRESULT
END TYPE
I found the problem may be in the "CWStr.inc",

Code: Select all

PRIVATE FUNCTION CWstr.AppendBuffer (BYVAL addrMemory AS ANY PTR, BYVAL nNumBytes AS UINT) AS BOOLEAN
   CWSTR_DP("CWSTR AppendBuffer " & .WSTR(m_BufferLen) & " " & .WSTR(nNumBytes))
'   IF (m_BufferLen + nNumBytes) > m_Capacity THEN this.ResizeBuffer(m_BufferLen + nNumBytes)
   ' // Add extra capacity to minimize multiple allocations when doing multiple concatenations
'   IF (m_BufferLen + nNumBytes) > m_Capacity THEN this.ResizeBuffer((m_BufferLen + nNumBytes) * 2)
   IF m_GrowSize < 0 THEN
      IF (m_BufferLen + nNumBytes) > m_Capacity THEN this.ResizeBuffer((m_BufferLen + nNumBytes) * 2)
   ELSE
      IF (m_BufferLen + nNumBytes) > m_Capacity THEN 
         IF nNumBytes > m_GrowSize THEN   <-------------
           this.ResizeBuffer(m_BufferLen + nNumBytes * 2 ) <-------------------
	 ELSE <--------------------------
           this.ResizeBuffer(m_BufferLen + nNumBytes + m_GrowSize )
	 END IF  <-------------------------
      END IF
   END IF
   IF m_pBuffer = NULL THEN RETURN FALSE
   memcpy(m_pBuffer + m_BufferLen, addrMemory, nNumBytes)
   m_BufferLen += nNumBytes
   ' Mark the end of the string with a double null
   m_pBuffer[m_BufferLen] = 0
   m_pBuffer[m_BufferLen + 1] = 0
   RETURN TRUE
   CWSTR_DP("--END - CWSTR AppendBuffer " & .WSTR(m_BufferLen))
END FUNCTION
Am I solve it right way?
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows (Updated April 19, 2018)

Post by PaulSquires »

Hi, no the problem is not in the CWstr.inc file. I expect the error may be due to the parsing algorithm that the editor is using. I have noticed a strange error like that before on a different set of files. I had to hard code bypassing those files because at the time I could not find out exactly why the parsing was failing.
cbruce
Posts: 163
Joined: Sep 12, 2007 19:13
Location: Dallas, Texas

Re: WinFBE FreeBASIC Editor for Windows (Updated April 19, 2018)

Post by cbruce »

Paul, do you dislike subroutines (vs. functions)? [smile]

I just had occasion to pull up WinFBE [function list]... and it is exactly what you say... a "function list"... no subroutines show up.

Is that on purpose for some reason?
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows (Updated April 19, 2018)

Post by PaulSquires »

cbruce wrote:Paul, do you dislike subroutines (vs. functions)? [smile]

I just had occasion to pull up WinFBE [function list]... and it is exactly what you say... a "function list"... no subroutines show up.

Is that on purpose for some reason?
Lol, blame this one on me - looks like I tweaked the parsing routine too much and screwed up the displaying of SUBs in the function list and the explorer treeview. Oops. :-)

You are right though on the topic of function vs subroutines. I code everything as functions out of habit. I used to use SUBs but at times I needed to change their functionality to functions in order to return a value, so over time I just got into the habit of coding everything as functions right from the start. Internally, I am pretty sure that subs are simply converted to functions anyway and dummy return values given.

I'll fix this one and pop up a new release.
Post Reply