• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

Konstruct Code Editor - Freeware

Started by Daren Oliver, January 17, 2011, 11:26:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

José Roca

What you need to do is:

1. Save the file, if needed; otherwise, PBForms will load outdated code.

2. Call PBForms this way:

    r = SHELL(strPBFormsPath & " " & strFilePath, 1)

Daren Oliver

Thanks José.

Bob Houle asked if it was possible to support PB Forms but I don't use it so I am uncertain to how it integrates with PB Edit.
I'm hoping it can just be added as a user tool.

Bob (Houle),
PM me if you still would like to try this.

Thanks.

Bob Houle

#62
Darin,

Since Jose has generously given us the source code to SED 202 and it switches between PBForms and his editor
you might look at his code:  http://www.jose.it-berater.org/smfforum/index.php?topic=3867.0

--Bob

P.S. - Your editors concept is a bit different, so I don't know it's possible to integrate PBForm's code into Konstruct.

José Roca

Forgot to say: Each time your editor is reactivated, you have to check if the code has been modified and reload it if needed or the changes made by PBForms (or another external tool for that matter) will be lost when you save the file.

Chris Boss

Darin,

Your editor is limited because you force the user to work with the project layout it uses.

Unlike Jose's SED or CSED, which can load a single BAS file and compile it.

If you could provide a way so the user could work with their own BAS files without the need for a project, then EZGUI users may be able to use it.

EZGUI 5.0's visual design handles all the project layout and simply calls a code editor (shell) passing it a filename (and path) .


If you could support something like:

konstruct.exe "c:\somefolder\SomeFile.bas"

so other apps can run yours and then let them simply compile it like SED or CSED does, then more people could use it.


Theo Gottwald

#65
Daren, as said before - no Editor is for everybody. Your Editor is project-oriented.

Don't worse it by trying to compete with Editors that are NOT project oriented.
Instead i recommend that you stay this way and try to improve it in its project-orientation.

Improve it to a bussiness Editor, enable Teamwork etc.
Let it be project oriented.

Those who prefer the "short and quick code" will preferably use another Editor.

Companies and people who work solely on big projects will prefer your sollution.
It's not a limitation, seen like that. It's where it comes from (you told me where it comes from).

There is one thing i would suggest you to implement.
In CSED i can now define:

Define the constant $SED_INCPATH or $CSED_INCPATH, e.g.
$CSED_INCPATH = "C:\Users\Pepe\PowerBASIC\PowerTrax\WINAPI_II"
And it will override the default include path.


If you could also implement this, we would have a standard for redefining the include path inside the code. That will it make easier to switch between Editors in projects.

Patrice Terrier

Visual Studio (the reference for me) is project oriented only ;)

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Theo Gottwald

You got my point, Patrice. Daren's Editor should go this direction.
Teamwork, Versioning etc.

Brice Manuel

Quote from: Chris BossYour editor is limited because you force the user to work with the project layout it uses.
This is not a limitation, it is a benefit and one of the things that make Konstruct different from the Cloneware editors out there.

Quote from: Chris BossIf you could provide a way so the user could work with their own BAS files without the need for a project, then EZGUI users may be able to use it.
Shouldn't the goal of somebody making a third-party tool be supporting official products, not other third-party products?

Quote from: Chris BossEZGUI 5.0's visual design handles all the project layout and simply calls a code editor (shell) passing it a filename (and path).
So EZGUI is limited because you force the user to work with the project layout it uses instead of conforming to what is used by another third-party tool?  The project format of Konstruct is very simple to figure out.  If you want to support it, you can easily add support to EZGUI and provide a way for EZGUI users to export their EZGUI project/code into a Konstruct project that can easily (and properly) be loaded into Konstruct.

José Roca

Because each one has his needs, it's good to have many editors to choose. CSED, that stands for Customized SED, is an editor that I have written mainly for me, because allows me to work quickly and comfortable with these thousands of header files that I translate and the hundreds of small examples that I prepare, as well as quickly test snippets of code without having to save them. If I had to make a project for each one, I will waste much time. In turn, if I had to write an application with many include files, resources, etc., then a project oriented editor will be better for the task.

Daren Oliver

I think that it's a case of using the right tool for the job. Even though I've written my own editor, I actually use Josés editor for 'Quick tests'. It's far more suited to that task than mine but most of my programming hours are spent on projects that run over a considerable amount of time.

Konstruct was designed to be project oriented and I admit it is quite strict in how it allows you to work but I personally find this a positive rather than a negative. I like the fact the folder structure is the same for every project, I know where everything is even if I have not worked on it for some time. Other small things like being able to right click on a function call and being able to go straight to that function, even if the containing file isn't open in the editor, is a real time saver when you are working a large number of files.

I'm sorry some people don't like the fact that Konstruct is so ridged but I'm afraid I have no plans to change direction.

On the bright side, there are several other excellent editors available for free so you can have the best of both worlds!

Daren Oliver

#71
Here is a template for using PB Forms as a user tool.
I dont own PB Forms so its not been tested by me but it appears to work.
Drop the attached folder into the Konstruct templates folder.

You'll need to create a PB Forms user tool. Its not difficult to work out but here's how...

Open the Tools Manager from the Tools menu and Add a new tool.
QuoteTool name : PB Forms 2.01
Command Line : C:\PBWin90\PBForms.exe (Change to your path)
Arguments : "<C>" (Including the quotes)
Tick "Save project when invoked" (Optional, you can save the file manually if you prefer)

Then to test it start a New Project and select the "PB Forms Dialog" template.
Select the PB Forms tool from the tool menu.
Add a button or whatever and save.
Go back to Konstruct and it will say "File modified, reload, blah, blah". Select YES.
Compile and Run.

Many thanks to Bob Houle for helping me with this.
If this proves successful I'll add the template to the next update.

Note: If you use Josés Includes, you'll need to drop a copy of "PBForms.inc" into his folder.

Now included in the v1.3.0.0 update

Daren Oliver

Updated to v1.3.0.0.

I'm in the process of moving home so I've had no time to add features that various people have requested but I'll get back to it when things are back to normal.

Daren Oliver


Just to clarify, use ".." to specify the relative project path when linking your own files.

Example...
This will link an SLL that resides in the Code folder that's in the main project folder :-
#Link "..\Code\Test.sll"

I'll write a help file someday, honest!

Daren Oliver

Hi Tony.

I hadn't considered plugin support but it wouldn't be too difficult. That said, I wouldn't be writing a custom interface, you would need to use the exisiting Scintilla documentation to learn how to manipulate a document. It's very easy once you are familiar with it!

Did you have a particular task in mind or was that just a general question?