FreeBasic IDE-poseidonFB(Update 2024.03.03)

User projects written in or related to FreeBASIC.
Post Reply
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2018.05.05)

Post by Kuan Hsu »

D.J.Peters wrote:You are kidding me :-)
I can make nice looking screenshots also but it does not mean it will work !

I can press [Apply] but I don't can close the project settings with [OK] button ?

Why need a static lib a main file ?
Congratulations, Joshy! You are 900 posted in this thread!

(1) Why do you think I paste the images for kidding you? I paste the images is because my limited ability of language, if I post a reply using chinese, I think I can write thousands words....ha ha^^
(2) By yours posted images, I got it! It's a bug, because of the Project Dir isn't existed yet! If you create the dir manually, the bug should be disappear, I'll fix at next reversion(Done at rev.397)
(3) It's not necessary......
Dinosaur
Posts: 1481
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: FreeBasic IDE-poseidonFB(Update 2018.05.09)

Post by Dinosaur »

Hi All

Still having problems with Poseidon closing down unexpectedly in Linux.
All parser options enabled except "Overwrite ....."
Example:
I am editing a line which is:

Code: Select all

Settings.CreamOpenTime += 10
By placing the cursor before the "S" of Settings I start to type a new condition statement with the intention of adding a space before "Settings"
Example:

Code: Select all

If Control.Cream > 0 Then Settings.CreamOpenTime += 10
However when I type the period "." Poseidon quits.
So the line would look like this

Code: Select all

If ControlSettings.CreamOpenTime += 10
If I press Esc to close the AutoComplete suggestion window before typing the "." then I can complete the line.

Regards
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2018.05.09)

Post by Kuan Hsu »

Dinosaur wrote: However when I type the period "." Poseidon quits.
So the line would look like this

Code: Select all

If ControlSettings.CreamOpenTime += 10
If I press Esc to close the AutoComplete suggestion window before typing the "." then I can complete the line.

Regards
The same bug about autocomplete using multiple threads, the point is close the autocomplete list window before create new one, I don't know why but works, only occur in linux
Fixed at rev.398
Dinosaur
Posts: 1481
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: FreeBasic IDE-poseidonFB(Update 2018.05.16)

Post by Dinosaur »

Hi All

It seems that the problem of Poseidon quitting as a result of "Enable Code Complete at Back thread" is not fixed.
This is a real nuisance if you don't continually save what you have typed.

So I would like to know what settings to set in preferences that will allow AutoComplete, BUT so I dont have to wait 5 seconds for Poseidon
to catch up on what I have typed.


Regards
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2018.05.16)

Post by Kuan Hsu »

Dinosaur wrote:Hi All

It seems that the problem of Poseidon quitting as a result of "Enable Code Complete at Back thread" is not fixed.
This is a real nuisance if you don't continually save what you have typed.

So I would like to know what settings to set in preferences that will allow AutoComplete, BUT so I dont have to wait 5 seconds for Poseidon
to catch up on what I have typed.


Regards
The issue is difficult to debug, I've tested about hundred times then commited rev.399, In my computer it worked OK, please test...^^
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: FreeBasic IDE-poseidonFB(Update 2018.06.21)

Post by dodicat »

Hello Kuan
I have just downloaded your latest version.
Poseidon is the only ide that handles unicode text and files here on Win 10.
Others seem to make a mess of unicode filenames.
But I have stumbled opon a little glitch.
lines 38/39

dim as string s="Poseidon" 'OK
'dim as string s=string(100,"7")+"B"' NOT OK

It throws an error on string(100,"7")+"B"

I think it has something to do with encoding bom set into the file.

Code: Select all

#include "crt.bi"


sub save(filename as wstring,txt as wstring )
dim as wstring * 20 r="w,ccs=UNICODE"
 dim as file ptr fp=_wfopen(@filename,@r)
   fputws(@txt,fp)
   fclose(fp)
end sub

sub load overload(filename as wstring,content as wstring)
     dim as wstring * 20 r="rt+,ccs=UNICODE"
     dim as wstring * 1000 t
     dim as long flag
   dim as file ptr fp = _wfopen(@filename,@r)
   if fp=0 then print "Unable to load ";filename:sleep:exit sub
   while 1
       flag=0
    if (fgetws (@t,1000,fp)= 0)then exit while
   content+=t+wchr(10)
   rtrim(content,wchr(10))
wend
fclose(fp)
end sub





save("Сергeй Сергeевич.txt","Сергeй Сергeевич")

dim as wstring * 200 ret
load("Сергeй Сергeевич.txt",ret)

print "file content ";ret

dim as string s="Poseidon"   'OK
'dim as string s=string(100,"7")+"B"' NOT OK

dim as wstring * 1005 ret2

save("newtextfile.txt",s)

load("newtextfile.txt",ret2)
print "file content ";ret2

sleep
   
ITomi
Posts: 154
Joined: Jul 31, 2015 11:23
Location: Hungary

Re: FreeBasic IDE-poseidonFB(Update 2018.06.21)

Post by ITomi »

Hello Kuan!

I tried the PoseidonFB; interesting, I could my game ("The island - An RTS game": viewtopic.php?f=8&t=24550 ) run without Win10 throw me out, as it often happen with the FBide.
But how can I use debugging in PoseidonFB? When I click on "Debug/Run Debug" nothing happen, just the program writes out at the bottom of the screen:
Running D:/progsetup/FreeBASIC-0_23_0-win32/sajatprogik/A_sziget/sziget.exe......
Then when I click on "Debug/Compile with debug" nothing happen again, just the program writes out at the bottom of the screen:
Compiler isn't existed......?
Compiler Path Error!

Where can I add the path of fbc.exe?
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2018.06.21)

Post by Kuan Hsu »

If we encode to UTF-8(without BOM), the file will be compiled OK......
But use below code, compile OK at UTF8 and UTF8.BOM while using stringMod function, compile failure while using string function...

Code: Select all

function stringMod overload( n as integer, s as integer ) as string
	
	dim as string ret 
	for i as integer = 1 to n
		ret = ret + chr(s)
	next
	return ret

end function

function stringMod overload( n as integer, s as const string ) as string
	
	dim as string ret 
	for i as integer = 1 to n
		ret = ret + s
	next
	return ret

end function

' Program Start........
cls

dim as string s=stringMod(100,"7")+"B"' OK
'dim as string s=string(100,"7")+"B"' NG
print s
sleep

end
Actually, I don't know why.....@@
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2018.06.21)

Post by Kuan Hsu »

ITomi wrote:Hello Kuan!

I tried the PoseidonFB; interesting, I could my game ("The island - An RTS game": viewtopic.php?f=8&t=24550 ) run without Win10 throw me out, as it often happen with the FBide.
But how can I use debugging in PoseidonFB? When I click on "Debug/Run Debug" nothing happen, just the program writes out at the bottom of the screen:
Running D:/progsetup/FreeBASIC-0_23_0-win32/sajatprogik/A_sziget/sziget.exe......
Then when I click on "Debug/Compile with debug" nothing happen again, just the program writes out at the bottom of the screen:
Compiler isn't existed......?
Compiler Path Error!

Where can I add the path of fbc.exe?
Options -> Preference -> Compiler tab -> Compiler Path, set where your FBC.exe is.....
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: FreeBasic IDE-poseidonFB(Update 2018.06.21)

Post by MrSwiss »

Kuan Hsu wrote:Actually, I don't know why.....@@
Your code modified, all is working okay, now:

Code: Select all

Function stringMod OverLoad( ByVal n As Integer, ByVal s As UByte ) As String
    Dim As String   ret

    For i As UInteger = 1 to n
        ret += Chr(s)
    Next

    Return ret
End Function

Function stringMod OverLoad( ByVal n As Integer, ByVal s As String ) As String
    Dim As String   ret

    For i As UInteger = 1 to n
        ret += s
    Next

    Return ret
End Function

' Program Start........
Cls

Dim As String   s1 = stringMod(100, "7") + "B"      ' OK overload, using string
Dim As String   s2 = stringMod(100, Asc("7")) + "B" ' OK overload, using UByte
Dim As String   s3 = String(100, Asc("7")) + "B"    ' OK

Print s1; Chr(10); s2; Chr(10); s3

Sleep
On the procedures taking UByte/numerical value, you have to convert from string-char ...
The same applies to FB's String() proc. -- See changes in code ...
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: FreeBasic IDE-poseidonFB(Update 2018.06.21)

Post by dodicat »

Thanks Kuan and Mr Swiss.
The Poseidon ide is the only one (of the many) I see handling unicode text properly in a .bas file, and running my little snippet.
The other ones I have tried fail in one way or another.
(I cannot test fbedit, it doesn't run here in Win 10)
I have downloaded a D compiler (dmd).
It is just different enough from C++ to make it difficult writing test code straight off.
but I shall persevere.
Thanks again.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: FreeBasic IDE-poseidonFB(Update 2018.06.21)

Post by PaulSquires »

dodicat wrote:Thanks Kuan and Mr Swiss.
The Poseidon ide is the only one (of the many) I see handling unicode text properly in a .bas file, and running my little snippet.
The other ones I have tried fail in one way or another.
(I cannot test fbedit, it doesn't run here in Win 10)
I have downloaded a D compiler (dmd).
It is just different enough from C++ to make it difficult writing test code straight off.
but I shall persevere.
Thanks again.
Hi dodicat, I just want to make sure that WinFBE is working correctly. Your sample code snippet worked correctly in WinFBE but you need to do two things before pasting your code into the editor:

(1) Change the font to use Russian. Go to "Options", "Environment Options", "Colors and Fonts", and next to the font name select Russian from the drop down combobox list.

(2) Change the file format to UTF-8 (BOM). Click on the statusbar panel that most like now reads "ANSI". Select "UTF-8 (BOM)" from the popup menu.

Now paste your code into the editor and compile/run. It will display correctly on the screen and will correctly create your file and correctly read back the text.

If that does not work for you then please let me know. Sorry for posting in this thread but I don't often have opportunities to see live unicode tests like this for the editor.
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: FreeBasic IDE-poseidonFB(Update 2018.06.21)

Post by MrSwiss »

dodicat wrote:I cannot test fbedit, it doesn't run here in Win 10
Well, I've no idea why it's not working on your side, because I use it every day,
on two WIN 10 pro 64, machines.

However, I've tried your snipet and, the cyrillic got mostly converted to "?".
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: FreeBasic IDE-poseidonFB(Update 2018.06.21)

Post by dodicat »

Paul squires.
I followed your instructions.
Russian and utf8
result from quick run

Code: Select all

file content Ñåðãeé Ñåðãeåâè÷

file content Poseidon

   
And poseidon

Code: Select all

file content Сергeй Сергeевич

file content Poseidon

  
Mr Swiss.
I'll try a fresh fbedit again

Edit
Paul Squires.
Build and execute OK.
The quick run fails.
Josep Roca
Posts: 564
Joined: Sep 27, 2016 18:20
Location: Valencia, Spain

Re: FreeBasic IDE-poseidonFB(Update 2018.06.21)

Post by Josep Roca »

@Paul

With the Quick Run option you're saving the contents to a temporary ansi file:

Code: Select all

      ' Copy the contents of the active document to the temporary source file.
      f = freefile
      open gCompile.MainFilename for output as #f
      put #f, , pDocMain->GetText
      close #f
This won't work with unicode.
Post Reply