GLBasic forum

Feature request => IDE/Syntax => Topic started by: bigsofty on 2011-Jun-07

Title: Bonkers suggestion
Post by: bigsofty on 2011-Jun-07
Daft idea but... command line extensions commands for the GLB editor?

For example "EditorE.exe /C myGame.gbap"

This would compile the "myGame.gbap" and write any errors to the console, then exit.

This would allow for the basic use of 3rd party editors on existing GLB projects.

Using the current GLB editor as a "middleman" to preserve copy protection yet free people to use any IDE/editor they wish.
Title: Re: Bonkers suggestion
Post by: Kitty Hello on 2011-Jun-07
not too hard to do IMO. Is the editor that bad, huh?
Title: Re: Bonkers suggestion
Post by: Sokurah on 2011-Jun-07
Quote from: Kitty Hello on 2011-Jun-07
not too hard to do IMO. Is the editor that bad, huh?

Personally I don't think it's too bad. Sure, it's nowhere as good as BLide for BlitzMax (but that's third party) but still 100 times better than the original BlitzMax/Monkey IDE. Still, who knows - if command line extensions are possible then someone might make a kickass IDE one day?

However, one thing I don't like is how it handles external source files. I don't like that 'Files' tab and how it's used. I'd LOVE if you could make it so they could be included in code - like: INCLUDE "src\movement.glb"...or something like that.
...that would make me happy. ;)
Title: Re: Bonkers suggestion
Post by: Slydog on 2011-Jun-07
Considering GLB is mostly a one-man operation, the IDE is pretty amazing at what it can do.

But there are times when I miss a certain feature that I've gotten used to from the 'big' IDEs. (Visual Studio etc)
Or the feature works differently or better in the other IDE.
Here's some items missing/not working for me in the GLB editor:
Each item is not a show stopper, and I understand some may be hard to fix or add.
Over the years I've gotten used to the limitations and quirks so it is no big deal. 
[Edit] Ha, over estimated this one!  Only been using GLB for a year!  Figure of speech?

I found this text editor with a quick Google search:
http://www.eclipse.org/Xtext/ (http://www.eclipse.org/Xtext/)
It is open source and has Syntax Highlighting, Code Completion, etc., and seems straight forward to configure.

If it were possible to configure a generic text editor to be fully compatible with GLB I would give it a try.
Otherwise I'm happy with the GLB IDE.
Title: Re: Bonkers suggestion
Post by: bigsofty on 2011-Jun-07
Quote from: Kitty Hello on 2011-Jun-07
not too hard to do IMO. Is the editor that bad, huh?

No, no, I really like the GLB editor but adding this feature would allow me to add my own custom features.

For example "Fold All", "Type" folding, code beautification, code snippets, macros, spell checking, multi-monitor support, SVN integration(although this looks like a feature that is coming!)... basically more flexibility when doing basic editing.

This is one of my editors that I use (it has a nice simple SVN/DIFF feature BTW ;) ) http://www.editplus.com

Its not essential but it would be nice to have, if its not too much bother for you Gernot.
Title: Re: Bonkers suggestion
Post by: ampos on 2011-Jun-07
IDEal! I want IDEal for GLB!  :P
Title: Re: Bonkers suggestion
Post by: MrTAToad on 2011-Jun-08
The GLBasic editor is very nice, although it can do very odd things after a lot of compiles & runs (ie, no menu options are selectable, no characters displayed).

It would be a Windows 7 thing though
Title: Re: Bonkers suggestion
Post by: XanthorXIII on 2011-Jun-08
I've been working with the GLBasic Editor and haven't found much to complain about except in the cases of code collapsing causing me Compiling Issues now and then which I have stopped using.
If this can be fixed that would be awesome.
Title: Re: Bonkers suggestion
Post by: Leginus on 2011-Jun-08
So how does the compiler return errors at the moment??
I don't understand how a 3rd party ide would receive the error messages from the compiler in order to relate these to the ide screen.
Are these written to a log?
Title: Re: Bonkers suggestion
Post by: Kitty Hello on 2011-Jun-08
I think it would have to be a console program like "glbasic.exe" that can do:
glbasic.exe /PLAT=WIN32 /DEBUG "path to gbap file"

Title: Re: Bonkers suggestion
Post by: Leginus on 2011-Jun-08
Ok, i get it, i think.

I didnt realise it didn't do that at the moment.
I read in the documentation that you could now use a 3rd party ide and send a command line to the GPC.exe file.
So that doesnt currently write a log file?



Title: Re: Bonkers suggestion
Post by: Kitty Hello on 2011-Jun-08
GPC compiles GLBasic code to C++.
Afterwards you have to kick a GCC C++ compiler.
And then the "MakeApp" for some platforms to pack everything where it should go.

I think some advanced build tool would be required.
Title: Re: Bonkers suggestion
Post by: Leginus on 2011-Jun-08
Sounds like that could be a lot of fun integrating into a third party :)
But just to clarify, I have no problems with the current IDE.  I think it is fine and I never use code folding anyway.
Title: Re: Bonkers suggestion
Post by: Moru on 2011-Jun-09
Can't you just close all windows in GLB and load up the files in the editor of your choice? Alt-tab to GLB and press F5 to test and then alt-tab back again.
Title: Re: Bonkers suggestion
Post by: kanonet on 2011-Jun-09
No this wont work, 'cuz GLB just compiles when you made some changes in its window. And before it compiles it would save, so alls changes, that you made in a diffrend ide, were lost.
To do it you way would be like:
open in your custom ide -> work -> save -> open GLB -> press F5 -> read errors -> close GLB -> do some changes in your custom ide -> save -> open GLB again -> ...
A bit to much work. ;)
But i have no problems with the ide, it looks a bit old, but it does nearly everything i want, in the way i want it. So its ok for me.
Title: Re: Bonkers suggestion
Post by: Moru on 2011-Jun-09
No, the problem will be auto-caps on keywords, if you type "print" instead of "PRINT", glb will say syntax error.
As a workaround for the previous problem, create a dummy-file and type a space in it every time you want to compile. GLB checks what files changed and recompiles them (as long as you didn't do the PrInT mistake above :-) )
Title: Re: Bonkers suggestion
Post by: Kitty Hello on 2011-Jun-09
if you close all source files in the GLB IDE, it will compile the saved files edited externally.
Title: Re: Bonkers suggestion
Post by: bigsofty on 2011-Jun-09
Command line arguments(calling the GLBIDE remotely) would be the easiest to integrate into 3rd part IDE/editors and maintain the GLB reg protection I think, as that's the bare minimum required by most IDE's.
Title: Re: Bonkers suggestion
Post by: Moru on 2011-Jun-09
Quote from: Kitty Hello on 2011-Jun-09
if you close all source files in the GLB IDE, it will compile the saved files edited externally.

No, if you have no source-files open, the compile/run buttons gets grayed out.
Title: Re: Bonkers suggestion
Post by: Gary on 2011-Jun-09
My only main gripe about the IDE is inconsistancy in the auto caps function.

If you have a function called say "print_titles" and as you are typing the name you type

printt

you hit delete to remove the extra t and print is then converted to upper case rather than waiting for a space to follow it

not sure also why typing "switch" converts to green until you type a letter after it. Is that left over from the SELECT/CASE convention?
Title: Re: Bonkers suggestion
Post by: mentalthink on 2011-Aug-13
for my the IDE it´s very good, only the default screen colors, are a litle breaker-eyes, and only another thing, Gernnot you can add some short-Cut for view the media folder.

Well I think have all the command of the menus whit shortcuts, can be very usefull and quickly, perhaps I look from the 3d software perspective.  :-[ :-[

Title: Re: Bonkers suggestion
Post by: Dark Schneider on 2011-Aug-13
Take in mind that BASIC always had its own enviroment, and for developing in BASIC you were forced to use that enviroment. So restricting to these rules is not bad at all for us the old-BASIC-users  :)

Maybe that idea of external compiling feature could be the begining of porting GLBasic to other platforms, like Mac.