Fixed: Crashing IDE when start on Linux:Xusinboy Bekchanov wrote: ↑May 30, 2022 18:34 Try from releases (1.3.2). I need to look at the latest unreleased version.
https://github.com/XusinboyBekchanov/Vi ... 68f0e5b38c
I looked and corrected.
Fixed: Crashing IDE when start on Linux:Xusinboy Bekchanov wrote: ↑May 30, 2022 18:34 Try from releases (1.3.2). I need to look at the latest unreleased version.
The Parameters Window will open in the Build -> Parameters menu. There, in the compiler line, it should have been written like this:
-b {S} -exx -v
When compiling, it was necessary to compile like this:
-b "Form1.frm" -exx -v
Have you changed this setting?
Code: Select all
sudo apt install gcc libncurses5-dev libffi-dev libgl1-mesa-dev libx11-dev libxext-dev libxrender-dev libxrandr-dev libxpm-dev libtinfo5 libgpm-dev
sudo apt install libgtk-3-dev
sudo apt install git
sudo apt-get install wget
rm -r VisualFBEditor
git clone https://github.com/XusinboyBekchanov/VisualFBEditor
cd VisualFBEditor
git clone https://github.com/XusinboyBekchanov/MyFbFramework
mkdir Compilers
cd Compilers
wget -O FreeBASIC-1.09.0-raspbian9-arm.tar.xz https://versaweb.dl.sourceforge.net/project/fbc/FreeBASIC-1.09.0/Binaries-Linux/raspbian9/FreeBASIC-1.09.0-raspbian9-arm.tar.xz
tar xf FreeBASIC-1.09.0-raspbian9-arm.tar.xz
cd ..
cd src
../Compilers/FreeBASIC-1.09.0-raspbian9-arm/bin/fbc "VisualFBEditor.bas" -x "../VisualFBEditor_gtk3" -i "../MyFbFramework" -d __USE_GTK3__ -v
cd ..
cd MyFbFramework/mff
../../Compilers/FreeBASIC-1.09.0-raspbian9-arm/bin/fbc -b "mff.bi" -dll -x "../libmff32_gtk3.so" -d __USE_GTK3__ -v
cd ..
cd ..
I don’t know, everything is correct in the release and github.
Very well, I will add this to the github with your permission.birosys wrote: ↑May 31, 2022 8:45 I downloaded the latest version from github, and I confirm that everything is ok now.
By changing the parameters in the Build menu, I was able to compile a test program.
I also rewrote the auto-install script for raspberry with dependent compiler packages.
Code: Select all
sudo apt install gcc libncurses5-dev libffi-dev libgl1-mesa-dev libx11-dev libxext-dev libxrender-dev libxrandr-dev libxpm-dev libtinfo5 libgpm-dev sudo apt install libgtk-3-dev sudo apt install git sudo apt-get install wget rm -r VisualFBEditor git clone https://github.com/XusinboyBekchanov/VisualFBEditor cd VisualFBEditor git clone https://github.com/XusinboyBekchanov/MyFbFramework mkdir Compilers cd Compilers wget -O FreeBASIC-1.09.0-raspbian9-arm.tar.xz https://versaweb.dl.sourceforge.net/project/fbc/FreeBASIC-1.09.0/Binaries-Linux/raspbian9/FreeBASIC-1.09.0-raspbian9-arm.tar.xz tar xf FreeBASIC-1.09.0-raspbian9-arm.tar.xz cd .. cd src ../Compilers/FreeBASIC-1.09.0-raspbian9-arm/bin/fbc "VisualFBEditor.bas" -x "../VisualFBEditor_gtk3" -i "../MyFbFramework" -d __USE_GTK3__ -v cd .. cd MyFbFramework/mff ../../Compilers/FreeBASIC-1.09.0-raspbian9-arm/bin/fbc -b "mff.bi" -dll -x "../libmff32_gtk3.so" -d __USE_GTK3__ -v cd .. cd ..
Thanks again.
Default value also changed to "-b {S} -exx":
Thanks.
Code: Select all
#ifdef __FB_WIN32__
#cmdline "Form1.rc"
#endif
'#Region "Form"
#include once "mff/Form.bi"
#include once "mff/WebBrowser.bi"
#include once "mff/CommandButton.bi"
#include once "mff/DateTimePicker.bi"
Using My.Sys.Forms
Type Form1Type Extends Form
Declare Static Sub _Form_Show(ByRef Sender As Form)
Declare Sub Form_Show(ByRef Sender As Form)
Declare Static Sub _CommandButton1_Click(ByRef Sender As Control)
Declare Sub CommandButton1_Click(ByRef Sender As Control)
Declare Static Sub _cmdSetBody_Click(ByRef Sender As Control)
Declare Sub cmdSetBody_Click(ByRef Sender As Control)
Declare Constructor
Dim As WebBrowser WebBrowser1
Dim As CommandButton cmdGetBody, cmdSetBody
End Type
Constructor Form1Type
' Form1
With This
.Name = "Form1"
.Text = "Form1"
.Designer = @This
.OnShow = @_Form_Show
.SetBounds 0, 0, 369, 323
End With
' WebBrowser1
With WebBrowser1
.Name = "WebBrowser1"
.Text = "WebBrowser1"
.TabIndex = 0
.Anchor.Top = AnchorStyle.asAnchor
.Anchor.Right = AnchorStyle.asAnchor
.Anchor.Left = AnchorStyle.asAnchor
.Anchor.Bottom = AnchorStyle.asAnchor
.SetBounds 4, 6, 328, 232
.Designer = @This
.Parent = @This
End With
' cmdGetBody
With cmdGetBody
.Name = "cmdGetBody"
.Text = "Get Body"
.TabIndex = 0
.Caption = "Get Body"
.Anchor.Right = AnchorStyle.asAnchor
.Anchor.Bottom = AnchorStyle.asAnchor
.SetBounds 215, 253, 104, 27
.Designer = @This
.OnClick = @_CommandButton1_Click
.Parent = @This
End With
' cmdSetBody
With cmdSetBody
.Name = "cmdSetBody"
.Text = "Set Body"
.TabIndex = 2
.Caption = "Set Body"
.Anchor.Left = AnchorStyle.asAnchor
.Anchor.Bottom = AnchorStyle.asAnchor
.SetBounds 59, 253, 98, 27
.Designer = @This
.OnClick = @_cmdSetBody_Click
.Parent = @This
End With
End Constructor
Private Sub Form1Type._cmdSetBody_Click(ByRef Sender As Control)
*Cast(Form1Type Ptr, Sender.Designer).cmdSetBody_Click(Sender)
End Sub
Private Sub Form1Type._CommandButton1_Click(ByRef Sender As Control)
*Cast(Form1Type Ptr, Sender.Designer).CommandButton1_Click(Sender)
End Sub
Private Sub Form1Type._Form_Show(ByRef Sender As Form)
*Cast(Form1Type Ptr, Sender.Designer).Form_Show(Sender)
End Sub
Dim Shared form1 As Form1Type
#ifndef _NOT_AUTORUN_FORMS_
#define _NOT_AUTORUN_FORMS_
Form1.Show
App.Run
#endif
'#End Region
' ========================================================================================
' HTML script to build a Google pie chart
' ========================================================================================
Private Function BuildPieChart3D () As String
Dim s As String
s = "<!DOCTYPE html>"
s += "<html>"
s += "<head>"
s += " <meta http-equiv='X-UA-Compatible' content='IE=edge' />"
s += " <meta http-equiv='MSThemeCompatible' content='Yes'>"
s += " <script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script>"
s += " <script type='text/javascript'>"
s += " google.charts.load('current', {packages:['corechart']});"
s += " google.charts.setOnLoadCallback(drawChart);"
s += " function drawChart() {"
s += " var data = google.visualization.arrayToDataTable(["
s += " ['Task', 'Hours per Day'],"
s += " ['Work', 11],"
s += " ['Eat', 2],"
s += " ['Commute', 2],"
s += " ['Watch TV', 2],"
s += " ['Sleep', 7]"
s += " ]);"
s += " var options = {"
s += " title: 'My Daily Activities',"
s += " is3D: true,"
s += " };"
s += " var chart = new google.visualization.PieChart(document.getElementById('piechart_3d'));"
s += " chart.draw(data, options);"
s += " }"
s += " </script>"
s += " </head>"
s += " <body>"
s += " <div id='piechart_3d' style='width: 600px; height: 400px;'></div>"
s += " </body>"
s += "</html>"
Function = s
End Function
Private Sub Form1Type.Form_Show(ByRef Sender As Form)
webBrowser1.navigate wszPath '"about:blank"
End Sub
Private Sub Form1Type.CommandButton1_Click(ByRef Sender As Control)
Debug.Print WebBrowser1.GetBody()
End Sub
Private Sub Form1Type.cmdSetBody_Click(ByRef Sender As Control)
' Build the script
Dim s As String = BuildPieChart3D
WebBrowser1.setbody(s, 0)
End Sub
Yes, it's finished now. But there are small nuances. We will fix them as we go.
After your fix on github, it still doesn't work for me.Avata wrote: ↑Jun 14, 2022 6:33 why the function setBody of control WebBrowser not working? But it is ok load from a file.
SaveToFile(wszPath, s)
' // Navigate to the path
webBrowser1.navigate wszPath
Code: Select all
#ifdef __FB_WIN32__ #cmdline "Form1.rc" #endif '#Region "Form" #include once "mff/Form.bi" #include once "mff/WebBrowser.bi" #include once "mff/CommandButton.bi" #include once "mff/DateTimePicker.bi" Using My.Sys.Forms Type Form1Type Extends Form Declare Static Sub _Form_Show(ByRef Sender As Form) Declare Sub Form_Show(ByRef Sender As Form) Declare Static Sub _CommandButton1_Click(ByRef Sender As Control) Declare Sub CommandButton1_Click(ByRef Sender As Control) Declare Static Sub _cmdSetBody_Click(ByRef Sender As Control) Declare Sub cmdSetBody_Click(ByRef Sender As Control) Declare Constructor Dim As WebBrowser WebBrowser1 Dim As CommandButton cmdGetBody, cmdSetBody End Type Constructor Form1Type ' Form1 With This .Name = "Form1" .Text = "Form1" .Designer = @This .OnShow = @_Form_Show .SetBounds 0, 0, 369, 323 End With ' WebBrowser1 With WebBrowser1 .Name = "WebBrowser1" .Text = "WebBrowser1" .TabIndex = 0 .Anchor.Top = AnchorStyle.asAnchor .Anchor.Right = AnchorStyle.asAnchor .Anchor.Left = AnchorStyle.asAnchor .Anchor.Bottom = AnchorStyle.asAnchor .SetBounds 4, 6, 328, 232 .Designer = @This .Parent = @This End With ' cmdGetBody With cmdGetBody .Name = "cmdGetBody" .Text = "Get Body" .TabIndex = 0 .Caption = "Get Body" .Anchor.Right = AnchorStyle.asAnchor .Anchor.Bottom = AnchorStyle.asAnchor .SetBounds 215, 253, 104, 27 .Designer = @This .OnClick = @_CommandButton1_Click .Parent = @This End With ' cmdSetBody With cmdSetBody .Name = "cmdSetBody" .Text = "Set Body" .TabIndex = 2 .Caption = "Set Body" .Anchor.Left = AnchorStyle.asAnchor .Anchor.Bottom = AnchorStyle.asAnchor .SetBounds 59, 253, 98, 27 .Designer = @This .OnClick = @_cmdSetBody_Click .Parent = @This End With End Constructor Private Sub Form1Type._cmdSetBody_Click(ByRef Sender As Control) *Cast(Form1Type Ptr, Sender.Designer).cmdSetBody_Click(Sender) End Sub Private Sub Form1Type._CommandButton1_Click(ByRef Sender As Control) *Cast(Form1Type Ptr, Sender.Designer).CommandButton1_Click(Sender) End Sub Private Sub Form1Type._Form_Show(ByRef Sender As Form) *Cast(Form1Type Ptr, Sender.Designer).Form_Show(Sender) End Sub Dim Shared form1 As Form1Type #ifndef _NOT_AUTORUN_FORMS_ #define _NOT_AUTORUN_FORMS_ Form1.Show App.Run #endif '#End Region ' ======================================================================================== ' HTML script to build a Google pie chart ' ======================================================================================== Private Function BuildPieChart3D () As String Dim s As String s = "<!DOCTYPE html>" s += "<html>" s += "<head>" s += " <meta http-equiv='X-UA-Compatible' content='IE=edge' />" s += " <meta http-equiv='MSThemeCompatible' content='Yes'>" s += " <script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script>" s += " <script type='text/javascript'>" s += " google.charts.load('current', {packages:['corechart']});" s += " google.charts.setOnLoadCallback(drawChart);" s += " function drawChart() {" s += " var data = google.visualization.arrayToDataTable([" s += " ['Task', 'Hours per Day']," s += " ['Work', 11]," s += " ['Eat', 2]," s += " ['Commute', 2]," s += " ['Watch TV', 2]," s += " ['Sleep', 7]" s += " ]);" s += " var options = {" s += " title: 'My Daily Activities'," s += " is3D: true," s += " };" s += " var chart = new google.visualization.PieChart(document.getElementById('piechart_3d'));" s += " chart.draw(data, options);" s += " }" s += " </script>" s += " </head>" s += " <body>" s += " <div id='piechart_3d' style='width: 600px; height: 400px;'></div>" s += " </body>" s += "</html>" Function = s End Function Private Sub Form1Type.Form_Show(ByRef Sender As Form) webBrowser1.navigate wszPath '"about:blank" End Sub Private Sub Form1Type.CommandButton1_Click(ByRef Sender As Control) Debug.Print WebBrowser1.GetBody() End Sub Private Sub Form1Type.cmdSetBody_Click(ByRef Sender As Control) ' Build the script Dim s As String = BuildPieChart3D WebBrowser1.setbody(s, 0) End Sub
This must be done together. But webkit is already used in the gtk version.