FB_GUI V1.20.5 (New Release Dec 19, 2019)
-
- Posts: 489
- Joined: Apr 18, 2008 4:09
- Location: Los Angeles, CA
- Contact:
@ Dinosaur,
As the author of FB_GUI, I would have to agree with TJF. If you're looking for cross-platform compatibility and "best practice" standards of code, GTK+ is much more robust and flexible.
That said, the FB_GUI project is still alive and kicking. I use FB_GUI for applications that perform data acquisition (DLL from Instrutech/HEKA) & analysis, mathematical modelling of physiological systems, and developing teaching software. As a result of heavy "real-world" usage of FB_GUI by our lab group, I can say it's pretty darn robust.
The Win API dependency is primarily for the File_Open dialog box, but I suppose that could be reverse-engineered if it were critical to run on other platforms. I don't have a machine running DOS or Unix, so I have never tested FB_GUI in those environments.
Overall, FB_GUI is a good choice if you want a VB6.0 - like interface, but with the simplicity of FB. The learning curve for FB_GUI is probably shorter than GTK+, and it comes with a CHM manual. In addition, FB_GUI is provided as an include file, with all the source code accessible, so there are no mysteries in compiled DLLs. I'm sure the code could be made more efficient with the new effort at adding Inheritance to FB (see Community Discussion).
As to some details....
1) Buttons are created / refreshed by calling graphics primitives to draw rectangles and custom font (xFont) text. This could be changed to operate on fb.image structure.
2) Adding widgets (buttons and such) in FB_GUI requires a unique number and bumps the count of Ctrl_Num_Total (max 256). You can also GET the Ctrl_Num for any widget if it was given a unique label B[Ctrl_Num].Label = "Any Text Here"
3) Event handling in FB_BUI is via the ScreenEvent function in FB. An event handle wrapper in FB_GUI is built in the PollEvent() function.
Good Luck,
As the author of FB_GUI, I would have to agree with TJF. If you're looking for cross-platform compatibility and "best practice" standards of code, GTK+ is much more robust and flexible.
That said, the FB_GUI project is still alive and kicking. I use FB_GUI for applications that perform data acquisition (DLL from Instrutech/HEKA) & analysis, mathematical modelling of physiological systems, and developing teaching software. As a result of heavy "real-world" usage of FB_GUI by our lab group, I can say it's pretty darn robust.
The Win API dependency is primarily for the File_Open dialog box, but I suppose that could be reverse-engineered if it were critical to run on other platforms. I don't have a machine running DOS or Unix, so I have never tested FB_GUI in those environments.
Overall, FB_GUI is a good choice if you want a VB6.0 - like interface, but with the simplicity of FB. The learning curve for FB_GUI is probably shorter than GTK+, and it comes with a CHM manual. In addition, FB_GUI is provided as an include file, with all the source code accessible, so there are no mysteries in compiled DLLs. I'm sure the code could be made more efficient with the new effort at adding Inheritance to FB (see Community Discussion).
As to some details....
1) Buttons are created / refreshed by calling graphics primitives to draw rectangles and custom font (xFont) text. This could be changed to operate on fb.image structure.
2) Adding widgets (buttons and such) in FB_GUI requires a unique number and bumps the count of Ctrl_Num_Total (max 256). You can also GET the Ctrl_Num for any widget if it was given a unique label B[Ctrl_Num].Label = "Any Text Here"
3) Event handling in FB_BUI is via the ScreenEvent function in FB. An event handle wrapper in FB_GUI is built in the PollEvent() function.
Good Luck,
I am just trying to learn FB_GUI and I'm working with the examples.
When I run the included query.exe it runs fine and closes properly, but when I try to use F5 (Quick Run) from within FBIde, it runs OK but when I say YES to exit, I get the Microsoft "FBIDETEMP.exe has encountered a problem and needs to close" window and am asked if I want to send an error report or not. In fact the same thing happens when I compile from within FBIde too using F9 or Cntl F9.
This is the query.bas code
The same thing happens with other examples, and code I have produced myself (by modifying examples).
I notice the ICONs of the included example "exe" files look different to my normal "exe" files.
What am I doing wrong here?
When I run the included query.exe it runs fine and closes properly, but when I try to use F5 (Quick Run) from within FBIde, it runs OK but when I say YES to exit, I get the Microsoft "FBIDETEMP.exe has encountered a problem and needs to close" window and am asked if I want to send an error report or not. In fact the same thing happens when I compile from within FBIde too using F9 or Cntl F9.
This is the query.bas code
Code: Select all
' Example GUI with just a PopUp Query
'
'
#include once "FB_GUI.BI"
#include once "FB_GUI/FB_GUI_LIB.Bas"
screen_height = 150
Screen_width = 250
DIM as byte Answer
SetVideo "Query Example", 1
Do
Answer = Query("Do you really want to exit?")
sleep 10
loop until answer
ShutDown
I notice the ICONs of the included example "exe" files look different to my normal "exe" files.
What am I doing wrong here?
-
- Posts: 489
- Joined: Apr 18, 2008 4:09
- Location: Los Angeles, CA
- Contact:
-
- Posts: 489
- Joined: Apr 18, 2008 4:09
- Location: Los Angeles, CA
- Contact:
-
- Posts: 489
- Joined: Apr 18, 2008 4:09
- Location: Los Angeles, CA
- Contact:
Hello BasicScience.
Just now, I downloaded the file FB_GUI_V1.20.4.zip from the link provided in the opening post on this topic.
When I try to compile and run the examples on WINXP/SP3, many of the source files seem to be corrupted.
Common themes are:
[1] missing CRLF in CASE, SELECT CASE and END SELECT statements and other random places.
[2] "End withend Sub" all on one line at the end of the Sub() instead of
End With
End Sub
[3] statements like: "SUB Serve_TxtBoxend Sub" at the end of the source that fb V.23.0 throws errors like:
SliderH_V.o:fake:(.text+0x1a3d4): undefined reference to `SERVE_TXTBOX@0'
Missing "Declare Sub" where only the Sub's name is given.
Way too buggy to use with confidence.
Just now, I downloaded the file FB_GUI_V1.20.4.zip from the link provided in the opening post on this topic.
When I try to compile and run the examples on WINXP/SP3, many of the source files seem to be corrupted.
Common themes are:
[1] missing CRLF in CASE, SELECT CASE and END SELECT statements and other random places.
[2] "End withend Sub" all on one line at the end of the Sub() instead of
End With
End Sub
[3] statements like: "SUB Serve_TxtBoxend Sub" at the end of the source that fb V.23.0 throws errors like:
SliderH_V.o:fake:(.text+0x1a3d4): undefined reference to `SERVE_TXTBOX@0'
Missing "Declare Sub" where only the Sub's name is given.
Way too buggy to use with confidence.
You didn't get errors on that when compiling, did you? So fbc understands the code.nobozoz wrote:[1] missing CRLF in CASE, SELECT CASE and END SELECT statements and other random places.
[2] "End withend Sub" all on one line at the end of the Sub() instead of
End With
End Sub
...
Way too buggy to use with confidence.
What about you IDE / editor? Can you use it with confidence?
-
- Posts: 489
- Joined: Apr 18, 2008 4:09
- Location: Los Angeles, CA
- Contact:
I use FBEDIT v1.0.7.6c. I've been using this IDE for over a year and have never had instances of source code chopped up in this way. The closest I ever came to a source code problem in FBEDIT was opening a Linux developed source code with unix-style line end formatting that caused the formatting to break.
I just now set up FBIDE 0.4.6 r3 with fb v.22 and reinstalled FBGUI there. All examples compiled and ran OK. I then copied all the .bas files used with FBIDE over to the original fb 0.23 installation and was able to compile all sources there using FBEDIT.
Thanks for your help. I may have had a one-of-a-kind glitch.
Edit 1: It appears that FBIDE can open unix-style source files correctly and automagically, but FBEDIT, by default, cannot. I found an addin DLL (TextFormatPlugin.dll) for FBEDIT that warns of unix-style files and offers to translate them for consumption by FBEDIT. As a test, I unzipped the original download and attempted to open each of the Example files in FBEDIT using the TextFormatPlugin.dll. Only files "Get_Input_PopUp.bas" and "Mssg_Box.bas" were not flagged by FBEDIT as having incompatible line endings.
I just now set up FBIDE 0.4.6 r3 with fb v.22 and reinstalled FBGUI there. All examples compiled and ran OK. I then copied all the .bas files used with FBIDE over to the original fb 0.23 installation and was able to compile all sources there using FBEDIT.
Thanks for your help. I may have had a one-of-a-kind glitch.
Edit 1: It appears that FBIDE can open unix-style source files correctly and automagically, but FBEDIT, by default, cannot. I found an addin DLL (TextFormatPlugin.dll) for FBEDIT that warns of unix-style files and offers to translate them for consumption by FBEDIT. As a test, I unzipped the original download and attempted to open each of the Example files in FBEDIT using the TextFormatPlugin.dll. Only files "Get_Input_PopUp.bas" and "Mssg_Box.bas" were not flagged by FBEDIT as having incompatible line endings.
Last edited by nobozoz on Nov 07, 2011 21:38, edited 1 time in total.
-
- Posts: 489
- Joined: Apr 18, 2008 4:09
- Location: Los Angeles, CA
- Contact:
Re: FB_GUI V1.20.4 (New Release Oct 29, 2011)
I have run the downloaded example files an they run clean.
When I compile them in FBIDE I get some crashes.
Data_Entry_New crashes when the form button is pressed.
FB_GUI_SHELL crashes when I select the Command13 -17.
Any thoughts?
OldJohn
When I compile them in FBIDE I get some crashes.
Data_Entry_New crashes when the form button is pressed.
FB_GUI_SHELL crashes when I select the Command13 -17.
Any thoughts?
OldJohn
-
- Site Admin
- Posts: 6323
- Joined: Jul 05, 2005 17:32
- Location: Manchester, Lancs
Re: FB_GUI V1.20.4 (New Release Oct 29, 2011)
Hi OldJohn, welcome to the forum.
Just to say sorry your post has only just been approved. We screen first posts from users because we've had some spambot issues. But sometimes these posts seem to get lost in the cracks for some reason..
Just to say sorry your post has only just been approved. We screen first posts from users because we've had some spambot issues. But sometimes these posts seem to get lost in the cracks for some reason..
-
- Posts: 489
- Joined: Apr 18, 2008 4:09
- Location: Los Angeles, CA
- Contact:
Re: FB_GUI V1.20.4 (New Release Oct 29, 2011)
Hi OldJohn,
Thanks for the interest in FB_GUI.
I just re-compiled FB_GUI 1.20.4 with FBide and all is working well. Rather than attempt to track down your problem, I will post an upgrade in a day or two. We still use FB_GUI every day in our lab, and many small tweaks and bug fixes have been made since my last update in 2011.
Basic Science
Thanks for the interest in FB_GUI.
I just re-compiled FB_GUI 1.20.4 with FBide and all is working well. Rather than attempt to track down your problem, I will post an upgrade in a day or two. We still use FB_GUI every day in our lab, and many small tweaks and bug fixes have been made since my last update in 2011.
Basic Science
Re: FB_GUI V1.20.4 (New Release Oct 29, 2011)
I'm currently having a look at the available GUIs for FreeBasic and would like to look further at FB_GUI, but I don't appear to have the file xfont.bi in my download https://sites.google.com/site/freebasic ... -downloads. Where can I download this file?