BASIC Studio for Linux (Cancelled)

User contributed sources that have become inactive, deprecated, or generally unusable. But ... we don't really want to throw them away either.
Post Reply
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: BasicStudio for Linux (in development)

Post by Munair »

St_W wrote:
Munair wrote:I have been thinking about that, but considered the project in a too early stage to use a VCS.
I don't think that there is such a thing as "too early to use a VCS", especially as there's no need to publish it if you're using e.g. GIT/Mercurial (or any over DVCS), you can upload it to GitHub/Bitbucket or similar services at any time later (or even not at all, if you decide to do so). Anyway, it's only a suggestion :-)
Maybe that's something between my ears. If I publish source code, I want it to be able to be at least a bit functional. But I'm still not sure how to proceed with the project in this respect, because as I've stated, building a team working on it would require the same focus from all members. Ideally ones who have worked with RealBasic in the past to get an idea of the concept. This concept is key as it would provide easy entrance for novice programmers to make programming on Linux fun and powerful at the same time. The last thing I want is having to put energy in keeping the project together, or as marcov coined it, to keep all noses in the same direction. So for now I'm happy to continue and build a basic interface to serve as a foundation for the concept to shine through. I'm sure once there, more programmers will get interested.
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: BasicStudio for Linux (in development)

Post by Munair »

Diving deeper into the world of GTK, I managed to include several widgets (controls), including the Stack widget which allows complete container designs with child widgets to be put on the Stack as a page. This is very useful for selecting the right interface when a particular item (from a tree view to be on the left) is chosen. In the following screenshots, two items of a module are shown. One allows for the definition of constants, the other enumerations. The StackSwitcher at the top is temporary and for development purposes only. Once the TreeView is implemented, the StackSwitcher will be removed.

Image
Definition of a constant

Image
Definition of an enumeration. This is an actual definition for the MsgBox:

Code: Select all

MsgBox("Error", "Unable to read from file.", msg.ERROR_ICON)

Code: Select all

sub Example()
	dim m as string = "File already exists." + EndOfLine + EndOfLine + "Overwrite?"
	dim r as msg = MsgBox("Warning", m, msg.YES_NO + msg.WARNING_ICON)
	if r = msg.NO then
		exit sub
	end if
	SaveFile()
end sub 
Defining items like this is of course nothing like the usual text interface of an IDE where everything is exposed to the programmer. In my view this was one of the powers of RealBasic. The programmer was only exposed to data that was selected and that mattered to the specific programming task. Of course, this may need some getting used to, but once a habit, it allows for easy and quick development. It is also very similar to QuickBASIC's IDE that only showed the selected view, either main module code or a selected sub/function.

By the way, the screenshots are made on Manjaro Linux with XFCE desktop and Minwaita theme and OneColor window decoration.
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: BasicStudio for Linux (in development)

Post by Munair »

The code that opens a new tab and shows the Module Editor is compact and doesn't expose the underlying GUI calls (GTK).

Code: Select all

sub TForm1.OpenModule()
	Notebook.AppendPage("Module1")
	
	' Page characteristics
	with Notebook.Pages.PageBox(Notebook.Pages.ItemIndex)
		.Orientation = eOrientation.VERTICAL
		.Homogeneous = true
		.Expand = true
		.Fill = true
		.Spacing = 5
		.ShowAll
	end with
	
	' Notebook's Page is parent
	dim Container as TContainer = TContainer(eAsWidget.GTK_BOX, _
		@Notebook.Pages.PageBox(Notebook.Pages.ItemIndex))
	
	' Create module editor and place it on the PageBox
	with ModuleEditor
		.Create()
		Container.AddChild(.Layout.Handle)
		.Layout.ShowAll
		.ShowNone
	end with
end sub
This UI related code will be generated by BASIC Studio. Needless to say the hardest part will be the Form/Window Designer. Especially since GTK 3 prefers automatic arrangement of controls over fixed sizes and coordinates. There lies the real challange. But I believe it can be done.
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: RAD for Linux

Post by TJF »

Munair wrote:... The hard part is setting up a GUI library against GTK. Most examples I look at come from C source code and some things just need some figuring out.
Do you know the project GTK version of FB-Debugger at viewtopic.php?f=8&t=23245 with source code at https://github.com/fbdebugger/fbdebugger?
Munair wrote: E.G. setting the max width and height for a window:

Code: Select all

constructor TwMain()
	Handle = gtk_window_new(GTK_WINDOW_TOPLEVEL)
	SetSize 600, 400
	' min size must be set first for max size to work
	SetMinSize fxWindowMinSize
	SetMaxSize 800, 600
end constructor
Don't hard code such settings in the source. Instead use the GTK builder resource file (if you really want to limit the users preferences - think about users with loss of vision).

Regards
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: RAD for Linux

Post by Munair »

TJF wrote:
Munair wrote:... The hard part is setting up a GUI library against GTK. Most examples I look at come from C source code and some things just need some figuring out.
Do you know the project GTK version of FB-Debugger at viewtopic.php?f=8&t=23245 with source code at https://github.com/fbdebugger/fbdebugger?
Yes I'm aware of the debugger project. I'm planning on looking into it to possibly include it in the project if licenses are compatible.
TJF wrote:
Munair wrote: E.G. setting the max width and height for a window:

Code: Select all

constructor TwMain()
	Handle = gtk_window_new(GTK_WINDOW_TOPLEVEL)
	SetSize 600, 400
	' min size must be set first for max size to work
	SetMinSize fxWindowMinSize
	SetMaxSize 800, 600
end constructor
Don't hard code such settings in the source. Instead use the GTK builder resource file (if you really want to limit the users preferences - think about users with loss of vision).

Regards
That was merely an example of GTK specifics. Actually the project aims at full RAD, meaning the inclusion of a visual designer and the programmer's ability to change object properties during run-time.
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: BASIC Studio for Linux (in development)

Post by Munair »

BTW, I do not use GTK Builder at all.
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: BASIC Studio for Linux (in development)

Post by Munair »

As one may have noticed, there have been no updates here for a while. The reason is that I started development of a new language. The language will be sort of a BASIC/Pascal hybrid (I guess).

In any case, the language will not be C or C++ like. ;-).
Last edited by Munair on Apr 20, 2020 12:20, edited 2 times in total.
speedfixer
Posts: 606
Joined: Nov 28, 2012 1:27
Location: CA, USA moving to WA, USA
Contact:

Re: BASIC Studio for Linux (in development)

Post by speedfixer »

I was excited; now I'm disappointed.

I was looking forward to an FB only effort.

david
marcov
Posts: 3455
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: RAD for Linux (in development)

Post by marcov »

Munair wrote:
BTW, I may or may not have said this clearly before but BasicStudio is not meant to become a RealStudio clone, nor is it meant to be fully compatible. The idea is to take the RS concept with a similar RAD environment, but allowing the freedom to advance in its own direction. Lazarus has a bit of a disadvantage in this respect and I do not want BasicStudio to be limited in the same fashion, nor is there any need to.
(Necroing here, came across this when finding threads over the language features, and saw a point I hadn't answered to)

While many of the vocal minority on the lazarus forum $#@$& at the delphi compatibility all the time (basically everytime we don't immediately get cracking at every suggested "feature"), I think Lazarus has been propelled more than held back by the compatibility.

And then I don't even mean the obvious bits (gaining contributors and recompiling Delphi source) because those were quite rare in the early days, say till 2005-2007.

No, more the common vision and the simple Occam's Razor "what does delphi do?" to quickly settle discussions and get working again.

This is no problem with single-person projects, but for a multi person project having a clear model is a big boon.
Post Reply