FreeBasic IDE-poseidonFB(Update 2024.07.13)

User projects written in or related to FreeBASIC.
Post Reply
UEZ
Posts: 999
Joined: May 05, 2017 19:59
Location: Germany

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by UEZ »

shadow008 wrote: Nov 21, 2023 3:56
UEZ wrote: Nov 20, 2023 21:41 Yes, I'm on a laptop but it occurs also when laptop is connected to a docking station and working with external mouse. With other editors, such as Notepad++, SciTE, etc. I don't have the problem - only with poseidonFB.
Well now I have to ask: is it a Lenovo laptop? I've had a problem with the trackpad in other things, but it's only ever about the double click behavior. Not that it's trackpad related in your case, but maybe there's some weird custom driver on it that causes this.
No, an HP Elitebook.
Kuan Hsu
Posts: 596
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by Kuan Hsu »

UEZ wrote: Nov 20, 2023 15:48 I have an annoying problem. It often happens that the cursor is anchored and the area is highlighted when the mouse is moved. When writing, the area is then overwritten. I always have to click in the editor to unlock it.
Is there any way to turn it off?

Thx.
It's strange.
Try to turn 'Options' -> 'Preference' -> 'Editor' -> 'Enable Document Multi Selection' off
UEZ
Posts: 999
Joined: May 05, 2017 19:59
Location: Germany

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by UEZ »

Kuan Hsu wrote: Nov 27, 2023 1:38
UEZ wrote: Nov 20, 2023 15:48 I have an annoying problem. It often happens that the cursor is anchored and the area is highlighted when the mouse is moved. When writing, the area is then overwritten. I always have to click in the editor to unlock it.
Is there any way to turn it off?

Thx.
It's strange.
Try to turn 'Options' -> 'Preference' -> 'Editor' -> 'Enable Document Multi Selection' off
thx KuanHsu, but it already turned off.
xiaoyao
Posts: 138
Joined: May 05, 2020 2:01

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by xiaoyao »

how to freebasic do like vb6 ?
new form1 clone

new form1,new form2?
form1.frm

Code: Select all

Option Explicit
Dim F2a As New Form2, F2b As New Form2
Private Sub Command1_Click()
F2a.Show
F2b.Show

F2a.Form2_abc = 11
F2b.Form2_abc = 22
F2a.Caption = "Form2_a"
F2b.Caption = "Form2_b"

MsgBox F2a.Form2_abc
MsgBox F2b.Form2_abc

End Sub
form2.frm

Code: Select all

Public Form2_abc As Long
Public Sub Form2_Test()
    MsgBox "it's form2 Test"
End Sub
Xusinboy Bekchanov
Posts: 806
Joined: Jul 26, 2018 18:28

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by Xusinboy Bekchanov »

xiaoyao wrote: Dec 28, 2023 11:20 how to freebasic do like vb6 ?
new form1 clone

new form1,new form2?
form1.frm

Code: Select all

Option Explicit
Dim F2a As New Form2, F2b As New Form2
Private Sub Command1_Click()
F2a.Show
F2b.Show

F2a.Form2_abc = 11
F2b.Form2_abc = 22
F2a.Caption = "Form2_a"
F2b.Caption = "Form2_b"

MsgBox F2a.Form2_abc
MsgBox F2b.Form2_abc

End Sub
form2.frm

Code: Select all

Public Form2_abc As Long
Public Sub Form2_Test()
    MsgBox "it's form2 Test"
End Sub
You can do this:
Form1.frm

Code: Select all

'#Region "Form"
	#if defined(__FB_MAIN__) AndAlso Not defined(__MAIN_FILE__)
		#define __MAIN_FILE__
		#ifdef __FB_WIN32__
			#cmdline "Form1.rc"
		#endif
		Const _MAIN_FILE_ = __FILE__
	#endif
	#include once "mff/Form.bi"
	#include once "mff/CommandButton.bi"
	#include once "Form2.frm"
	
	Using My.Sys.Forms
	
	Type Form1Type Extends Form
		Declare Sub CommandButton1_Click(ByRef Sender As Control)
		Declare Constructor
		
		Dim As CommandButton CommandButton1
		Dim F2a As Form2Type Ptr = New Form2Type
		Dim F2b As Form2Type Ptr = New Form2Type
	End Type
	
	Constructor Form1Type
		' Form1
		With This
			.Name = "Form1"
			.Text = "Form1"
			.Designer = @This
			.SetBounds 0, 0, 350, 300
		End With
		' CommandButton1
		With CommandButton1
			.Name = "CommandButton1"
			.Text = "CommandButton1"
			.TabIndex = 0
			.SetBounds 80, 110, 160, 50
			.Designer = @This
			.OnClick = Cast(Sub(ByRef Designer As My.Sys.Object, ByRef Sender As Control), @CommandButton1_Click)
			.Parent = @This
		End With
	End Constructor
	
	Dim Shared Form1 As Form1Type
	
	#if _MAIN_FILE_ = __FILE__
		App.DarkMode = True
		Form1.MainForm = True
		Form1.Show
		App.Run
	#endif
'#End Region

Private Sub Form1Type.CommandButton1_Click(ByRef Sender As Control)
	F2a->Show
	F2b->Show

	F2a->Form2_abc = 11
	F2b->Form2_abc = 22
	F2a->Caption = "Form2_a"
	F2b->Caption = "Form2_b"

	MsgBox Str(F2a->Form2_abc)
	MsgBox Str(F2b->Form2_abc)
End Sub
Form2.frm

Code: Select all

'#Region "Form"
	#if defined(__FB_MAIN__) AndAlso Not defined(__MAIN_FILE__)
		#define __MAIN_FILE__
		#ifdef __FB_WIN32__
			#cmdline "Form1.rc"
		#endif
		Const _MAIN_FILE_ = __FILE__
	#endif
	#include once "mff/Form.bi"
	
	Using My.Sys.Forms
	
	Type Form2Type Extends Form
		Declare Constructor
		
	Public:
		Form2_abc As Long
		Declare Sub Form2_Test
	End Type
	
	Constructor Form2Type
		' Form2
		With This
			.Name = "Form2"
			.Text = "Form2"
			.Designer = @This
			.SetBounds 0, 0, 350, 300
		End With
	End Constructor
	
	Dim Shared Form2 As Form2Type
	
	#if _MAIN_FILE_ = __FILE__
		App.DarkMode = True
		Form2.MainForm = True
		Form2.Show
		App.Run
	#endif
'#End Region

Public Sub Form2Type.Form2_Test
	MsgBox "it's form2 Test"
End Sub
To do this you need this library: https://freebasic.net/forum/viewtopic.php?t=28397
Xusinboy Bekchanov
Posts: 806
Joined: Jul 26, 2018 18:28

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by Xusinboy Bekchanov »

Or you can do this:

Form1.frm

Code: Select all

'#Region "Form"
	#if defined(__FB_MAIN__) AndAlso Not defined(__MAIN_FILE__)
		#define __MAIN_FILE__
		#ifdef __FB_WIN32__
			#cmdline "Form1.rc"
		#endif
		Const _MAIN_FILE_ = __FILE__
	#endif
	#include once "mff/Form.bi"
	#include once "mff/CommandButton.bi"
	#include once "Form2.frm"
	
	Using My.Sys.Forms
	
	Type Form1Type Extends Form
		Declare Sub CommandButton1_Click(ByRef Sender As Control)
		Declare Constructor
		
		Dim As CommandButton CommandButton1
		Dim F2a As Form2Type
		Dim F2b As Form2Type
	End Type
	
	Constructor Form1Type
		' Form1
		With This
			.Name = "Form1"
			.Text = "Form1"
			.Designer = @This
			.SetBounds 0, 0, 350, 300
		End With
		' CommandButton1
		With CommandButton1
			.Name = "CommandButton1"
			.Text = "CommandButton1"
			.TabIndex = 0
			.SetBounds 80, 110, 160, 50
			.Designer = @This
			.OnClick = Cast(Sub(ByRef Designer As My.Sys.Object, ByRef Sender As Control), @CommandButton1_Click)
			.Parent = @This
		End With
	End Constructor
	
	Dim Shared Form1 As Form1Type
	
	#if _MAIN_FILE_ = __FILE__
		App.DarkMode = True
		Form1.MainForm = True
		Form1.Show
		App.Run
	#endif
'#End Region

Private Sub Form1Type.CommandButton1_Click(ByRef Sender As Control)
	F2a.Show
	F2b.Show

	F2a.Form2_abc = 11
	F2b.Form2_abc = 22
	F2a.Caption = "Form2_a"
	F2b.Caption = "Form2_b"

	MsgBox Str(F2a.Form2_abc)
	MsgBox Str(F2b.Form2_abc)
End Sub
AWPStar
Posts: 47
Joined: May 03, 2009 21:47

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by AWPStar »

1)
I get a lot of errors when i run it by clicking on BAS-file.
"icon/xpm/outline/....xpm isn't existed!"
And std.file.FileExecption@std\file.d(451): settings/compilerOpstionsFB.txt at the end

When i run just poseidonFB.exe alone - no error messages.

When i place "icons" folder into the place where i open bas-file from, i get only last error.

So it seems that poseidonFB sets current folder wrong.

2)
IDE Crashes while compiling and permission denied message appears.


btw. How can i get rid of "Are you sure exit poseidon?" when i close window, even if there is no open files?
Kuan Hsu
Posts: 596
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by Kuan Hsu »

AWPStar wrote: Jan 31, 2024 11:46 1)
I get a lot of errors when i run it by clicking on BAS-file.
"icon/xpm/outline/....xpm isn't existed!"
And std.file.FileExecption@std\file.d(451): settings/compilerOpstionsFB.txt at the end

When i run just poseidonFB.exe alone - no error messages.

When i place "icons" folder into the place where i open bas-file from, i get only last error.

So it seems that poseidonFB sets current folder wrong.

2)
IDE Crashes while compiling and permission denied message appears.


btw. How can i get rid of "Are you sure exit poseidon?" when i close window, even if there is no open files?
(1) It should be fixed at rev.526
(2) I need more message, please~~
(3) Yes, but next rev.
AWPStar
Posts: 47
Joined: May 03, 2009 21:47

Re: FreeBasic IDE-poseidonFB(Update 2024.03.03)

Post by AWPStar »

Thank you for the response!

2) There is option "Before Compile, Delete Existed Execure File"
If it is checked, and and FBC get "Permission denied"(executable is running or blocked(handle opened)) then poseidonFB shows message "std.file.FileException@std\file.d(1061)" and crashes.

Also, i used to click(LMB) on #include file with Control button to open it. Now that doesn't work and there's no option to choose mouse click in hotkeys.
Now it's only available by clicking "Goto definition" at the menu.

Is there a way to make my own plugin with access to code inside the editor? I would like make code formatter. That would be nice to have ability to create menus options, windows e.t.c
Kuan Hsu
Posts: 596
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2024.03.03)

Post by Kuan Hsu »

AWPStar wrote: Mar 07, 2024 10:28 Thank you for the response!

2) There is option "Before Compile, Delete Existed Execure File"
If it is checked, and and FBC get "Permission denied"(executable is running or blocked(handle opened)) then poseidonFB shows message "std.file.FileException@std\file.d(1061)" and crashes.

Also, i used to click(LMB) on #include file with Control button to open it. Now that doesn't work and there's no option to choose mouse click in hotkeys.
Now it's only available by clicking "Goto definition" at the menu.

Is there a way to make my own plugin with access to code inside the editor? I would like make code formatter. That would be nice to have ability to create menus options, windows e.t.c
Sorry reply so late~
(1) It's easy to fix
(2) I've forgotten why I remove the ctrl+LMB for "Goto definition", please use hot-key replace (default = Alt+G)
(3) First your plugin need coding use IUP, the example is: https://bitbucket.org/KuanHsu/poseidon- ... r/FBStyle/
Mysoft
Posts: 840
Joined: Jul 28, 2005 13:56
Location: Brazil, Santa Catarina, Indaial (ouch!)
Contact:

Re: FreeBasic IDE-poseidonFB(Update 2024.06.01)

Post by Mysoft »

ok... poseidon when doing quick-run is always saving the file with an utf-8 BOM... which is causing a fbc compiler bug when handling files with utf-8 bom...
the option to "create new documents without bom" does not affect the behavior... and "converting" to utf without bom have no effect either... so that's a bug.
Kuan Hsu
Posts: 596
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2024.06.01)

Post by Kuan Hsu »

Mysoft wrote: Jun 01, 2024 19:59 ok... poseidon when doing quick-run is always saving the file with an utf-8 BOM... which is causing a fbc compiler bug when handling files with utf-8 bom...
the option to "create new documents without bom" does not affect the behavior... and "converting" to utf without bom have no effect either... so that's a bug.
Please test rev.531~
Quick-Run will saved temp file using active document encoding and compile & run
lenoil98
Posts: 20
Joined: Feb 16, 2021 0:13
Location: USA

Re: FreeBasic IDE-poseidonFB(Update 2024.06.15)

Post by lenoil98 »

I might have missed it but how do I build from source? I’m on FreeBSD and I don’t see a .dub or json file. What am I missing?
Kuan Hsu
Posts: 596
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2024.06.15)

Post by Kuan Hsu »

lenoil98 wrote: Jun 25, 2024 4:56 I might have missed it but how do I build from source? I’m on FreeBSD and I don’t see a .dub or json file. What am I missing?
I'm not sure could IUP work on FreeBSD...

I build poseidonFB using poseidonD IDE( work on Windows and Linux), in your case, please use old-school style:(below sample is LDC on windows)

Code: Select all

k:/codingpark/ldc2-1.36.0-windows-multilib/bin/ldc2.exe -of"poseidonFB_x64_LDC.exe"  "IDE.d" "actionManager.d" "darkmode/darkmode.d" "dialogs/argOptionDlg.d" "dialogs/baseDlg.d" "dialogs/customDlg.d" "dialogs/customMessageDlg.d" "dialogs/fileDlg.d" "dialogs/findFilesDlg.d" "dialogs/helpDlg.d" "dialogs/manualDlg.d" "dialogs/preferenceDlg.d" "dialogs/prjPropertyDlg.d" "dialogs/searchDlg.d" "dialogs/shortcutDlg.d" "dialogs/singleTextDlg.d" "executer.d" "global.d" "images/imageData.d" "images/xpm.d" "layout.d" "layouts/customMenu.d" "layouts/debugger.d" "layouts/messagePanel.d" "layouts/outlinePanel.d" "layouts/projectPanel.d" "layouts/statusBar.d" "layouts/tabDocument.d" "layouts/table.d" "layouts/toolbar.d" "main.d" "menu.d" "navcache.d" "parser/_parser.d" "parser/ast.d" "parser/autocompletion.d" "parser/autocompletionD.d" "parser/autocompletionFB.d" "parser/live.d" "parser/parser.d" "parser/parserD.d" "parser/parserFB.d" "parser/scanner.d" "parser/token.d" "project.d" "scintilla.d" "tools.d" -I"K:/codingPark/import" -L/LIBPATH:"K:\codingPark\Libraries\iup\iup5947\dll14_64" --m64 -odobjs -O -d-version=FBIDE -d-version=GUI
lenoil98
Posts: 20
Joined: Feb 16, 2021 0:13
Location: USA

Re: FreeBasic IDE-poseidonFB(Update 2024.06.15)

Post by lenoil98 »

Kuan Hsu wrote: Jun 25, 2024 10:50
lenoil98 wrote: Jun 25, 2024 4:56 I might have missed it but how do I build from source? I’m on FreeBSD and I don’t see a .dub or json file. What am I missing?
I'm not sure could IUP work on FreeBSD...

I build poseidonFB using poseidonD IDE( work on Windows and Linux), in your case, please use old-school style:(below sample is LDC on windows)

Code: Select all

k:/codingpark/ldc2-1.36.0-windows-multilib/bin/ldc2.exe -of"poseidonFB_x64_LDC.exe"  "IDE.d" "actionManager.d" "darkmode/darkmode.d" "dialogs/argOptionDlg.d" "dialogs/baseDlg.d" "dialogs/customDlg.d" "dialogs/customMessageDlg.d" "dialogs/fileDlg.d" "dialogs/findFilesDlg.d" "dialogs/helpDlg.d" "dialogs/manualDlg.d" "dialogs/preferenceDlg.d" "dialogs/prjPropertyDlg.d" "dialogs/searchDlg.d" "dialogs/shortcutDlg.d" "dialogs/singleTextDlg.d" "executer.d" "global.d" "images/imageData.d" "images/xpm.d" "layout.d" "layouts/customMenu.d" "layouts/debugger.d" "layouts/messagePanel.d" "layouts/outlinePanel.d" "layouts/projectPanel.d" "layouts/statusBar.d" "layouts/tabDocument.d" "layouts/table.d" "layouts/toolbar.d" "main.d" "menu.d" "navcache.d" "parser/_parser.d" "parser/ast.d" "parser/autocompletion.d" "parser/autocompletionD.d" "parser/autocompletionFB.d" "parser/live.d" "parser/parser.d" "parser/parserD.d" "parser/parserFB.d" "parser/scanner.d" "parser/token.d" "project.d" "scintilla.d" "tools.d" -I"K:/codingPark/import" -L/LIBPATH:"K:\codingPark\Libraries\iup\iup5947\dll14_64" --m64 -odobjs -O -d-version=FBIDE -d-version=GUI
Thanks! I'll have to work on getting iup and working.
Post Reply