Why not a main window?

For other topics related to the FreeBASIC project or its community.
Shikatsu
Posts: 4
Joined: Nov 23, 2010 2:10

Why not a main window?

Postby Shikatsu » Nov 29, 2010 17:49

Greetings EveryOne :)

Wouldn't it be a good idea for people running windows to get the result of what they coded (in FB) in a Main Window (beside the GUI) instead of outputting the result in the dos.
I think it would save alot of time as every time you execute a compiled code you have to open the cmd prompt and run it in there, plus the black screen of the cmd makes the result seem little confusing and unreadable.
And i think it would make things for new comers more plainly and less confusing.
KristopherWindsor
Posts: 2428
Joined: Jul 19, 2006 19:17
Location: Sunnyvale, CA
Contact:

Postby KristopherWindsor » Nov 29, 2010 18:37

FB writes to standard out; any third-party IDE could show this output in a different window though.
TJF
Posts: 3486
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Nov 29, 2010 18:40

Use Geany IDE. It can handle it.
nime
Posts: 32
Joined: Feb 22, 2010 12:31
Location: Croatia

Postby nime » Nov 29, 2010 19:23

Hello TJF,
I visited link you suggested and there stands that Geany is not IDE but "Geany is a text editor using the GTK2 toolkit with basic"...

I am also wondering why someone didnt yet packed all those cappabilities of GTK and FB in one. So we can use classes like in VB like myButton.width = or MessageBox (title, message, flags) or Form2.hide and so. Because much of good job here is allready donned.
Shikatsu
Posts: 4
Joined: Nov 23, 2010 2:10

Postby Shikatsu » Nov 29, 2010 19:53

Thanks for the reply.
About Geany IDE i couldn't figure out how to set the path for fbc to be recognized by the IDE, any help please.
TJF
Posts: 3486
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Nov 29, 2010 19:57

Hello nime:

nime wrote:Hello TJF,
I visited link you suggested and there stands that Geany is not IDE but "Geany is a text editor using the GTK2 toolkit with basic"...

I use Geany as an IDE for month on LINUX and win. I'm not the only user ...

nime wrote:I am also wondering why someone didnt yet packed all those cappabilities of GTK and FB in one...

GTK+tobac2 connects the FB source with the GTK-GUI-XML files from Glade. From my point of view there is no need for something more. Packing all in one package means much more effort on updating, when one component comes in a new version.

nime wrote: ... So we can use classes like in VB like myButton.width = or MessageBox (title, message, flags) or Form2.hide and so. Because much of good job here is allready donned.

A GtkButton doesn't have one width. It has a width request that depends on the pic/text/... the button contains. It's pretty simple to code wrappers around the GTK functions to get a VB-like API. But you'll end up with strongly limited GTK functionality. Why should anybody do that?
TJF
Posts: 3486
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Nov 29, 2010 20:06

Shikatsu wrote:Thanks for the reply.
About Geany IDE i couldn't figure out how to set the path for fbc to be recognized by the IDE, any help please.

If FreeBasic is installed correctly you needn't set any path. Geany will call 'fbc' with your source file.

You can modify the used command in the Build menu (last entry, something like 'Set Includes and Arguments' -- 'Include Parameter und Argumente angeben' in German version)
nime
Posts: 32
Joined: Feb 22, 2010 12:31
Location: Croatia

Postby nime » Nov 29, 2010 20:43

TJF, I use geany for freebasic too at linux for more than year.
OK, maybe we can call that like IDE but at first place I think IDE is something like M$VB or RealBasic where you can do graphical things fast and easy and then wasting ALL THE TIME for "real" programming.
With gtk now "as is" most of my time goes to constructing GUI.
Unfortunatelly, with C is same story.

This is why I think of coupling GTK in FB classes.
Worser than VB6 can't be!
But this is still highly usable.
This can also increase FB community much-much times.
Especially if here would be added classes like Cairo, SDL and/or OpenAL, openGL, cURL, mySQL, zipLib and so at easy way with BUNCH of useful examples :)
Ready for use and stronger than those horribly slow NET stuff.

That will be the IDE of dreams (they are free too:).
TJF
Posts: 3486
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Nov 29, 2010 21:11

nime wrote:With gtk now "as is" most of my time goes to constructing GUI.
Unfortunatelly, with C is same story.

Have you tried Glade3 and GTK+tobac2?

I like to have several apps to do GUI design and FB coding. I don't miss anything. BTW: in QT development center, the GUI designer and the editor are separate as well.

nime wrote:Especially if here would be added classes like Cairo, SDL and/or OpenAL, openGL, cURL, mySQL, zipLib and so at easy way with BUNCH of useful examples :)
Ready for use and stronger than those horribly slow NET stuff.

You may be interested in KBasic, based on the QT lib. My experience with QT: you're pretty fast when starting to code. But very soon there is a point where you have to do more than using prepacked code. You have to write extensions matching the existing code. And at that point you'll learn that you don't understand the code you're using and it's very hard to figure out how to continue (ie Stueber seems to be at this point coding FBPro). So the development is going slower and slower or stops at all.

Using GTK it's vice versa. You have to figure out a lot at the beginning. But if you're coding well, the development speed increases.
Shikatsu
Posts: 4
Joined: Nov 23, 2010 2:10

Postby Shikatsu » Nov 29, 2010 23:53

If FreeBasic is installed correctly you needn't set any path. Geany will call 'fbc' with your source file.

I am sure FreeBasic is installed correctly cos it's working with fbide.
when i run a FB code, the cmd prompt appears and this is what it say:

Tried to execute the C:\FreeBASIC\examples\manual\array\ellipsis.bas
for example.

Code: Select all

'"./ellipsis"' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue ...
nime
Posts: 32
Joined: Feb 22, 2010 12:31
Location: Croatia

Postby nime » Nov 30, 2010 6:20

TJF, yes, I'll try all those stuff and now I'm affraid that someone can conclude that I want "too much", but I don't think so.
QT is not for me, it is too huge and takes much place for code which I actually dont need, want and understand.
Similar with KBasic, huge ee files, much of dependencyes and so.
And much work to finish yet stays behind this (interesting) basic.
Glade and tobac I also considered and this is tool for simplicating in writing FB files from GTK, far from what I think. Before all because Glade is tool for "constructing" GUI without any actions. In real programming stays many things to do at runtime and then you again need to know "all" about GTK.

From all basic's I see to now FB seems to me like best possible appearence of basic. But for now this is just "engine". I think it is worth of work to extend them to (independent and free) GUI and more because so small and fast exe files on win and linux nothing can do like FB!
That means that FB is wery healthy engine (when some improvements yet will be done). Also is important for FB that you can hang number of libraries to them and run systems code (API's). This is promisses basis for something what is completelly different of QT and similar systems which carryes much of "dead code" (they call them "reusable":) like windows itselfs.

@Shikatsu
You have to compile every bas program first in order to run it or start them with "fast run" which would compile it for you.
See in the "make" menu of fbIDE.
To see if your fbc is in a path simply open command prompt and type "fbc" to see if it is and if not you have to set FreeBACIC directory in the global enviroinments "Path" variable.
You can rum FB program with "black console" or without them (its choosable). This console can be useful in debugging or watching what happens in your program.
Unfortunatelly fbIDE is platform dependent (windows).
TJF
Posts: 3486
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Nov 30, 2010 6:21

Shikatsu wrote:Tried to execute the C:\FreeBASIC\examples\manual\array\ellipsis.bas
for example.

Code: Select all

'"./ellipsis"' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue ...

Are you on win ('C:\FreeBasic...') or UNIX ('./ellipsis')?
TJF
Posts: 3486
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Nov 30, 2010 6:57

nime wrote:From all basic's I see to now FB seems to me like best possible appearence of basic. But for now this is just "engine". I think it is worth of work to extend them to (independent and free) GUI and more because so small and fast exe files on win and linux nothing can do like FB!
That means that FB is wery healthy engine (when some improvements yet will be done). Also is important for FB that you can hang number of libraries to them and run systems code (API's). This is promisses basis for something what is completelly different of QT and similar systems which carryes much of "dead code" (they call them "reusable":) like windows itselfs.

This describes in good words why I'm using FreeBasic. No system or configuration will fullfil 100 % of my whishes or needs. Also my whishes may change from time to time. That's why I'm looking for an well documented open system that I can extend as I need it.

nime wrote:Before all because Glade is tool for "constructing" GUI without any actions. In real programming stays many things to do at runtime and then you again need to know "all" about GTK.

If you want to code good GUI apps you should know your toolkit, anyway.

I think you didn't test Glade well. There are some things you can do without coding a single source line, ie. connecting signals with GTK functions, building models for ComboBoxes/List-/Tree-/Icon-Views, defining accelerator groups ... . From my point of view, a GUI designer should not do more.

If you miss something like a set of FB code blocks for using more complex widgets like ie TreeViews, nobody will stop you writing and publishing it. I also thought about that. But since I'm busy with GTK+tobac2 and actual GTK headers, I'll not start such a project without partners.
Shikatsu
Posts: 4
Joined: Nov 23, 2010 2:10

Postby Shikatsu » Nov 30, 2010 17:57

Are you on win ('C:\FreeBasic...') or UNIX ('./ellipsis')?

I am on ('C:\FreeBasic...'), my OS is windows.
so what's wrong?
fxm
Posts: 9310
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Postby fxm » Nov 30, 2010 19:42

Configuration of Geany IDE under Windows :

- Open any file with '.bas' extension in order to enter in the 'FreeBasic source file' mode.

- Menu 'Build' then 'Set Build Commands'.

1) For FreeBASIC compiler setting
In the first line of the 'FreeBasic source file Commands' block :
- Enter (for example) in the label field (first column) :
_Compile (FreeBASIC)

- Enter in the command field (second column) :
"c:\FreeBASIC\fbc" -exx "%f"
(supposing that 'fbc.exe' is in directory 'c:\FreeBASIC\')

2) For FreeBASIC help setting
In the third line of the 'FreeBasic source file Commands' block (the second line is reserved for the predefined button "Build") :
- Enter (for example) in the label field (first column) :
_Help (FreeBASIC)

- Enter in the command field (second column) :
hh.exe "c:\FreeBASIC\FB-manual-0.21.1.chm"
(supposing that help file 'FB-manual-0.21.1.chm' is in directory 'c:\FreeBASIC\')

3) Then 'OK' to valid and memorize


-You can now compile any source file (.bas) using menu 'Build' then 'Compile (FreeBASIC)', or directly using the button 'Compile'.
- You can also call the FreeBASIC documentation using menu 'Build' then 'Help (FreeBASIC)'

-Menu 'Build' then 'Execute' to run the compiled program (.exe), or directly button 'Execute'.
Last edited by fxm on Dec 13, 2010 15:08, edited 2 times in total.

Return to “Community Discussion”

Who is online

Users browsing this forum: badidea and 0 guests