Powerbasic Museum 2020-B

General Category => Third-Party Add-Ons => Topic started by: Daren Oliver on January 17, 2011, 11:26:20 PM

Title: Konstruct Code Editor - Freeware
Post by: Daren Oliver on January 17, 2011, 11:26:20 PM
This is my own personal PB code editor for PBWin. It doesn't have a help file but it shouldn't be too difficult to figure out how it works. There are a few quirks that may throw you initially and the way I've done certain things may seem odd but I have good reasons for doing what I have done.

This initial release is considered Beta due to the fact that I have made quite a few changes to get it to the point where I was happy to release it and I may have introduced some new bugs in the process. Also be aware that I've only really ever used it on XP so dont be surprised if it falls flat on its face under other OS's.

Heres a few tips...

Create a dedicated Konstruct project folder and be sure to set it under 'Enviroment' in the Options dialog. It will save you having to type in paths and navigation will be quicker as it will default to this folder.

The OutputDebugString API will send text to the Debug window.

Ctrl + Space will show\hide the panes. Useful for small monitors\laptops.

Regards,
Daren

Corrupted file replaced - 16th Aug 2011
Title: Re: Konstruct Code Editor - Freeware
Post by: Theo Gottwald on January 18, 2011, 06:43:51 AM
Daren, thanks for sharing your Editor.
It looks great!

Can we place a wishlist here below?
Making it free has the advantage for you that you get testers and comments aboiut your tool.

Let me say that like, that this Editor is definitely "project-Oriented".
You always start " as a project".

Also i have seen that there is an (yet empty) folder for the PB 10 Keywordlist.
Means that you will adapt it to PB 10 when its out - a good idea!

I have some suggestions / wishes on a first look:
- In the project settings beeing able to override the standard API-Path (so you can choose on project base if you prefer Jose's API or choose the PB-API files).
- Support for Drag and Drop (VB-like) to add files to the project.
- A additional Menüpoint: Open Project-Folder in the Explorer.
- add a "Project Global Search and Replace"
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on January 18, 2011, 05:14:23 PM
Theo,

Re your suggestions...

QuoteIn the project settings beeing able to override the standard API-Path (so you can choose on project base if you prefer Jose's API or choose the PB-API files).
There are currently 5 compiler slots in the Options Dialog. The reason for this is to enable you to set different compiler configurations, even for the same compiler. I've added a pic at the bottom to clarify what I mean. You can freely switch the active compiler configuration from one to another at any point and the effect will be immediate.


QuoteSupport for Drag and Drop (VB-like) to add files to the project.
I've not investigated this yet but I don't think it will be difficult to implement.


QuoteA additional Menüpoint: Open Project-Folder in the Explorer.
Ok, easy enough. You can currently open the project folder by selecting the .KCP item in the treeview and hitting the "Open Containing Folder" button.


Quoteadd a Project Global Search and Replace
I came to your house last night while you were sleeping and added this feature. Look again!


A quick note about your comment regarding it being "Project-Oriented". I tend to work on projects that last for weeks or even months so this suits me fine but I did have comments in the past saying that it's not very friendly if you just want to run a quick test on some code that you dont initially intend to keep, maybe a forum post or whatever, because you have to clean up the files and folders that a new project generates. This is no longer the case, read the following statement carefully...

If you start a new project from the New Project Dialog and never save the project at any point (either from the menu or the toolbar), and answer 'No' when you are asked to save before closing the project, then the project folder and all sub folders and files will be moved to the recycle bin. This does not apply to a project that is loaded by any other means.

So basically, this means that if you started a new project and didnt save the project, you didn't save anything! I will be adding a checkbox to the Options Dialog to enable\disable this feature that will default to Disabled and I will also add a message box to warn the user when this is about to happen.

Regards,
Daren
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on January 18, 2011, 05:33:21 PM
I was asked how to use Folding Rem statements.
Title: Re: Konstruct Code Editor - Freeware
Post by: Theo Gottwald on January 18, 2011, 06:14:27 PM
Quote. I tend to work on projects that last for weeks or even months so this suits me fine

Thats the way "How to make a good tool better".
Let's do it with your Editor also. Don't be in a hurry.

Take time, improve it step-by-step. As it is, you see that it got quite >30 fans on the first day!

Good to know that its made for "Project People" like us.
Good that it supports several different compiler configurations.
Thinking about it, there are a lot of interesting future Chances to expand it for TEAMWORK.
Something that is actually a bit thin with PowerBasic (locking files from a workplace).

I do not think you should invest time to get in competition with those "Quick-Start Editors" like the PB Editor.
For just quickly compiling something these editors are fine and maybe unbeatable.
Let them be and concentrate on the strength of this one: to be project-oriented.

Expand it direction "Team-Work", "Version Control","Team-Messaging","ToDo-List","Project-Delegation".
We need several Editors for different niches in which PB can be used.
That looks to me like the diection to have expansion in long term.
I's even thinkable to make the Freeware limited to 5 Seats and then make a commercial version for larger companies.

And keep the VB Feeling.
Title: Re: Konstruct Code Editor - Freeware
Post by: Eros Olmi on January 19, 2011, 08:56:54 AM
As far as I can see, Konstruct works fine under Windows 7 64 bit.

My curiosity: what language do you use to develop Konstruct?

Regards
Eros
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on January 19, 2011, 09:18:22 AM

Thanks for testing on Win7 64 Eros.

It was developed using PB v9.05.

Regards,
Daren
Title: Re: Konstruct Code Editor - Freeware
Post by: Eros Olmi on January 19, 2011, 10:51:38 AM
I too develop an editor/ide called thinAir (http://www.thinbasic.com/pad/screen001.png) but your UI style is much better and clean
I will steal some ideas :)

Just last question: your tabs controls are different from standard. Did you developed them as custom controls?
Title: Re: Konstruct Code Editor - Freeware
Post by: Mike Mayerhoffer on January 19, 2011, 12:44:53 PM
Thanks Daren ,

looks nice, seems pretty straight forward - no help file needed.

-Mike
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on January 19, 2011, 03:28:34 PM

Thanks for the comments Mike.

Eros,
You are welcome to steal any of my ideas.
The Tab control is indeed a custom control although I can take no credit for how it looks. If you google some screen shots of VS2005, you'll see the exact same tab control, or at least very close.
Title: Re: Konstruct Code Editor - Freeware
Post by: Patrice Terrier on January 20, 2011, 08:29:22 AM
Daren,

I like the modern interface design, well done, thank you.

...
Title: Re: Konstruct Code Editor - Freeware
Post by: Petr Schreiber on January 20, 2011, 09:50:00 AM
Daren,

this is great job! It takes the best from Visual Studio and brings it to PB world.
Big thanks and congratulations!


Petr
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on January 20, 2011, 07:49:20 PM
Thanks Petr and special thanks to Patrice for not commenting on my poor photoshop skills on the start page banner!

Added an update to v1.1.0 in the first post. Filled a few requests and fixed a few bugs. See History.txt for details.

Regards,
Daren

Added:
Forgot to mention you can click on tooltips although its not a new feature.
For example, type 'CreateWindowEx(', click the tooltop and the tip text will paste itself into the code.
You can also hold the shift key down while clicking and it will paste in the same display format as the tip. (Multiline tips only)
Title: Re: Konstruct Code Editor - Freeware
Post by: Jim Dunn on January 20, 2011, 11:06:40 PM
Wow, Daren, nice... thanks for sharing!!
Title: Re: Konstruct Code Editor - Freeware
Post by: Theo Gottwald on January 21, 2011, 07:45:48 AM
Let's take a look into the last update history:

Quote
-------------------------------------------------------------------------------
Version 1.1.0 - Jan 20 2011
-------------------------------------------------------------------------------
#Files modified from previous update:
Konstruct.exe

---------

#Feature Added.
Messagebox. 'Folder Deletion'
Provides an option to the delete the files and folders that were created, as
the result of a stating a New Project, if the project was closed without
ever being saved.

---------

#Feature Added.
Menu item. 'Open containing folder'

---------

#Feature Added.
Menu item. 'Task List'
Scans for tokens at the start of a comment (not case sensitive).
Tokens accepted:- 'Fix:', 'Hack:', 'Note:', 'ToDo:'

---------

#Feature Added.
Build Configuration combobox.
When set to "Release", any debug\tools metastatement settings are overridden.
When set to "Debug", current metastatement settings apply and the %DEBUG_ON
constant is automatically added for use with conditional compilation.

---------

#Feature Added.
Drag n drop to add files to an open project is now supported.

---------

#Bug Fix.
When only spaces were entered into the Find Dialog and 'Find All' was clicked,
the Find Results pane would not always draw correctly.

---------

#Bug Fix.
Double clicking an empty line in the Find Results pane when it already
contained search data would cause a GPF.

---------

#Bug Fix.
Temporary file and folder deletion. If CurDir$ returned the same path
as the folder being deleted, the SHFileOperation API would fail reporting
that the folder is 'currently in use'.


-------------------------------------------------------------------------------
Version 1.0.0 beta - Jan 17 2011
-------------------------------------------------------------------------------
Initial public release
Title: Re: Konstruct Code Editor - Freeware
Post by: Petr Schreiber on January 21, 2011, 09:27:34 AM
Darren,

thanks a lot. The idea with Debug/Release switch is nice.


Petr
Title: Re: Konstruct Code Editor - Freeware
Post by: Bob Houle on January 23, 2011, 08:03:34 PM
Quick question...

I've added an 'Include' file to my new project (using 'ADD File'). Konstruct places the include file AFTER the "Main.Bas" include file.

When I compile I get an error that states: Missing Declaration: sx_Version() which is in my include file.

Shouldn't the users include files be placed BEFORE the Main.Bas include, so that Main.bas knows the functions I wish to include?


see jpgs.


Thanks,
--Bob
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on January 23, 2011, 11:31:26 PM
Bob,

You can change the order of the include files by moving them in the Active Files List (Last toolbar button in the Explorer pane).

I'll change it at some point so new files are inserted before the Main.bas although PBs ability to forward reference normally takes care of most issues.

Regards,
Daren
Title: Re: Konstruct Code Editor - Freeware
Post by: Bob Houle on January 23, 2011, 11:36:04 PM
 :)

Worked like a charm and now I'm off to the races!

--Bob
Title: Re: Konstruct Code Editor - Freeware
Post by: Bob Houle on January 30, 2011, 08:45:29 PM
Daren,

I noticed that the "Text Font" selections are quite limited and not all fonts in my Windows system are available.
I'm quite partial to Verdana (TT font) which is not included but yet I can change it to: 'BatangChe' or 'SimHei'

Is it because of the lexer that you use?

Regards,
--Bob
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on January 30, 2011, 10:00:57 PM
Bob,

The available fonts are restricted to monospaced fonts only. Its not unusual for code editors to do this. Maybe some of the .NET ones allow other fonts but it sure makes column mode editing tricky.

I'll consider it for the next update.
Title: Re: Konstruct Code Editor - Freeware
Post by: Bob Houle on January 31, 2011, 12:49:01 AM
Thanks Daren,

New monitors (16:9) have tons of space off to the right of the screen so a additional fonts make more sense than they did in the past.

regards,
--Bob

Title: Re: Konstruct Code Editor - Freeware
Post by: Theo Gottwald on January 31, 2011, 11:28:05 AM
Daren, I'd prefer to sty with Monospaced Fonts, anything else will make your development go into a fals direction.
A program code Editor does formatting of codelines.
If the fonts are not monospaced and you format them, and later load them into - for example PB-Editor, it looks strange.

Don't go this way, stay monospaced. We must not have everything DOTNET has.
As i wrote in my previous posts, when advancing your Editor go direction "Teamwork/Versioning".
This is a completely open field for PB Developments.

Don't think of artistic stuff which is of no common use. People want to use Oriental Fonts should load their programs into MS Word.
And then print them.
Title: Re: Konstruct Code Editor - Freeware
Post by: Bob Houle on January 31, 2011, 04:27:12 PM
Theo,

On a previous post you asked for "VB-like" drag and drop support.. did anyone poo-poo on your idea?


I've read through a lot of your posts and you seem to have a lot of opinions and NO solutions!

--Bob
Title: Re: Konstruct Code Editor - Freeware
Post by: Theo Gottwald on January 31, 2011, 10:14:13 PM
Bob, don't take this personal, please.
I think you have never programmed an Editor or a Editor control.
Otherwise you'd know that using a "Proportional Font" at this place is like puting a knife in a bee-nest.
My suggestion is from the position of somebody who has a bit experience in that area.
I want to see the Editor from Daten to get useful features and prevent him from going into "dead end roads".
For this reason i share personal experience in that topic.

Using Proportional Fonts is the right decision for an serious  - non gaming - edit ontrol.
In my opinion. I have given some arguments, for example that any formatting will be destroyed by just changing to another font otherwise.

As said, this should not be in any way an offence against ayour opinion, Bob.
Just give your thought, explain it, bring your arguments and let Daren make a decision.

I have just tried to load a non-proportional Font into the scintilla control from SED.
It works, but it slows things down significantly and to me it just doesn't make a sense.

Did you try it yourself?
Which Font would you choose other then courier?
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on February 28, 2011, 01:53:03 AM
v1.2.0 Update added.

Quote-------------------------------------------------------------------------------
Version 1.2.0 - Feb 27 2011
-------------------------------------------------------------------------------
#Files modified from previous update:
Konstruct.exe
SciLexer.dll
Lexer.dll

---------

#Feature Added.
Modified Line Markers.
Yellow = Modified and unsaved.
Green = Modified and saved.

---------

#Feature Added.
User Tools Manager.

---------

#Feature Added.
Toolbox Pane.

---------

#Feature Added.
Programmable Middle Mouse Button.

---------

#Feature Added.
Basic ASCII Table. (Embedded in Toolbox)

---------

#Feature Added.
Code Store. (Embedded in Toolbox)
Drag selected text onto panel to add code snippet.
Shift+Left mouse click to edit item description.
Delete item by deleting description and hitting Enter.
Re-order by dragging item.

---------

#Feature Added.
Menu item. 'Append'
Performs a copy operation and appends the selected text to the Clipboard.

---------

#Feature Added.
Auto Close Compiler Log.
Closes log tab after a successful compile.

---------

#Feature Added.
Copy As BBCode.
Shift+Ctrl+C copies selected text as BBCode to the Clipboard.
(Will be reimplemented as a User Tool in a future update.)

---------

#Operational Change.
Files added to the current project are added before "Main.bas"
in the Active Files list.

---------

#Operational Change.
"Main.bas" cannot be renamed or deleted.

---------

#Bug Fix.
Brace Highlighting display color did not change in the Options Dialog.

---------

#Bug Fix.
Selected text region was incorrectly recalled due to whitespace removal
when a file is loaded.

---------

#Note.
Some menu items have been moved to more appropriate positions.
Preliminary PB10 folding and Metastatement code added.
Keywords folder structure modified to eliminate unnecessary file duplication.
Minor visual changes.

-------------------------------------------------------------------------------
Title: Re: Konstruct Code Editor - Freeware
Post by: José Roca on February 28, 2011, 03:12:50 AM
It GPFs in Windows 7 when trying to load a project or creating a new one.
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on February 28, 2011, 03:17:01 AM
Thanks José. I'll did check it on Win7 in VMWare. I'll take a look...
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on February 28, 2011, 04:04:03 AM
José

I still can't get it to crash although as I said, I'm testing in a virtual machine.
Would you mind testing with the attached file when you have time?
It's the same exe but with debugging enabled.

I'll try on my Win7 laptop at work tomorrow if I don't make any progress.

Thanks.
Title: Re: Konstruct Code Editor - Freeware
Post by: Jim Dunn on February 28, 2011, 04:08:33 AM
(worked on my Windows 7 Enterprise, 32-bit)
Title: Re: Konstruct Code Editor - Freeware
Post by: José Roca on February 28, 2011, 04:27:13 AM
No difference. Maybe it's not because it's Windows 7, but for another reason. As soon as I try to load a project it GPFs. No debug information is displayed.
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on February 28, 2011, 04:33:29 AM
Ok, thanks for testing anyway.

I've removed the main zip from my initial post until I manage to figure it out. I've tried it on a W2K, 3 XP machines and the Virtual Win7 but they all seem to work fine.  ??? I hate this kind of problem.
Title: Re: Konstruct Code Editor - Freeware
Post by: Petr Schreiber on February 28, 2011, 09:20:13 AM
Hi Daren,

if you'll need some testing on Windows 7 64bit, I am signing in!


Petr
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on February 28, 2011, 11:09:54 AM
Hi Petr,

Thanks, that would be very helpful. I still cant get it to crash and I've tried on 2 more Win7 machines and another WinXP.

José,

I was wondering if you tried to maintain your Keyword files. Specifically, do you have :-
<Your Konstruct Folder>\Keywords\PowerBASIC 10.txt

I did find a problem if the new Keyword folder structure was not as expected.

Thanks.

(I've added another debug version to the first post in this thread)

Title: Re: Konstruct Code Editor - Freeware
Post by: José Roca on February 28, 2011, 03:48:47 PM
This new version doesn't GPF :)

What I did was the same that have done now. I installed the editor in a new folder and created an additional folder called Projects. Then  I run the editor and created a new project. The editor created the project folders but crashed. Then I tried to load the created project and it crashed again.
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on February 28, 2011, 03:57:56 PM
Great ;D

I'll remove the Debug version shortly and replace it with a release version... and pray.
The only changes I've made is with checking for PB10 files\keywords used in folding and lexing.
If this fixes it then todays lesson for me is don't try to support something that you don't have  :'(

Thanks for taking the time José.
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on February 28, 2011, 04:27:39 PM
v1.2.1 Update added. Hopefully all fixed now.

Quote-------------------------------------------------------------------------------
Version 1.2.1 - Feb 28 2011
-------------------------------------------------------------------------------
#Files modified from previous update:
Konstruct.exe
Lexer.dll

---------

#Bug Fix.
GPF. A pointer being passed to Scintilla that should have referenced a PB10 keywords
list was not being checked to see if it was empty. Also a messagebox has now been
added to inform the user when keyword files are missing rather than just silently
disabling folding\lexing.

---------
Title: Re: Konstruct Code Editor - Freeware
Post by: Petr Schreiber on February 28, 2011, 07:20:05 PM
Thanks for the update,

so far it works just great!


Petr
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on February 28, 2011, 08:14:20 PM

Thanks for testing Petr.

Seems I broke the 'Class Method Create' and 'Class Method Destoy' folding in my haste to fix the last bug.

Another update soon. Sorry. *sigh*
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on February 28, 2011, 09:20:52 PM
v1.2.1.1 Update added

Quote-------------------------------------------------------------------------------
Version 1.2.1.1 - Feb 28 2011
-------------------------------------------------------------------------------
#Files modified from previous update:
Lexer.dll

---------

#Bug Fix.
"Class Method Create" and "Class Method Destroy" folding were broken
during the last bug fix.

---------

Title: Re: Konstruct Code Editor - Freeware
Post by: Petr Schreiber on March 01, 2011, 09:16:48 AM
Hi Daren,

thanks for the update!

Few suggestions/ideas:
Problems found:
In the end I realised I should have excluded all INC files from build. There was a 45 of them, so it took a while to do it manually.
So maybe when importing existing INC files, it could "Exclude from build" them automatically.

Later I realised I can change this in options, maybe some comment in the Initialize.bas could directly mention "you can change this in Project properties"



Petr
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on March 01, 2011, 04:34:33 PM
Hi Petr,

QuoteWhen I right click project in the tree on the right (Explorer), it would be nice to show context menu with the same contents as Project menu in the main menu, except Remove file
When I right click file in project in the tree on the right (Explorer), it would be nice to add to context menu item "Remove file"
When I right click tab header, it would be nice to show context menu with items: "Close", "Close All", "Close all but this", |, "Save", "Save As", |, "Copy file name to clipboard" (including path)

All the Menu suggestions sound good and are fairly easy to implement.
The 'Remove File' menu item has been on my ToDo list forever it seems. I think I keep overlooking it because you can just select the file in the treeview and hit the Delete key although it should be added for completeness.

QuoteI have main code, which includes A.inc.
A.inc includes B.inc.
In A.inc I have defined equate, but I got errors in B.inc that equate is not defined

I also had the same issue when converting existing projects. Obviously this doesn't happen when you write a project from scratch but I agree it would be useful to provide a way around this. I'll have a think!

QuoteI also found out I cannot change the Initialize.bas file, I needed it to change name of produced DLL, but it was not possible, as well as removing inclusion of Win32API.inc

I will write a basic help file at some point as the Read-Only Initialization file has stumped several people. Initially, I wasn't going to let the user even see this file considering it's 'Auto Generated' using their current settings\selections but after trying it for a while I decided I didn't like hidden files in my project and it was better to be able to see what was happening, even if I couldn't edit it directly.

QuoteDuring compilation, it reports it cannot find include file I place to same folder as Main.BAS, even if I add it to the project

I'm confused by this one. Is the file thats not found even listed in the Initialization file?

Thanks for the feedback. I welcome it, the good and the bad!
Title: Re: Konstruct Code Editor - Freeware
Post by: Eros Olmi on March 01, 2011, 05:21:39 PM
Attention, attention:
Petr is number one bug hunting and new feature suggester

:P  ;D
Title: Re: Konstruct Code Editor - Freeware
Post by: Petr Schreiber on March 02, 2011, 09:07:29 PM
Hehe,

thanks Eros ;D

Quote
I'm confused by this one. Is the file thats not found even listed in the Initialization file?
This was the reason. It took me while to find out that to make file listed in Initialization file, I must add it to project but do not exclude it from build.

But this makes it little bit hard to port old code, with complex #include hierarchy, because sometimes, for organization reasons, I do not want to have all #includes listed on one place, but instead I spread them in few include files to follow some logical structure.

One more thing - #include files in Initialize.BAS have full paths to include files listed. This way it might become hard to share the project with someone, who prefers to put whole project to other directory than I have in my drive.

Ok, that was some "complaining" again from my side :), but I must say I am really impressed by the IDE so far and for new projects I have no problems with it (except maybe the strict #include statement policy).


Petr
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on March 02, 2011, 11:19:19 PM
Hi Petr,

QuoteThis was the reason. It took me while to find out that to make file listed in Initialization file, I must add it to project but do not exclude it from build.

But this makes it little bit hard to port old code, with complex #include hierarchy, because sometimes, for organization reasons, I do not want to have all #includes listed on one place, but instead I spread then per-partes in few include files to follow some logical structure.

The trick is to add all the files to the project and then exclude any nested include files from the build and let the compiler pick them up instead. I didn't anticipate the fact that one day I would release this into the public domain which means I haven't taken other peoples coding styles into consideration unfortunately.

QuoteOne more thing - #include files in Initialize.BAS have full paths to include files listed. This way it might become hard to share the project with someone, who prefers to put whole project to other directory than I have in my drive.

Any file paths outside of the project folder are absolute. Any file paths inside the project folder are relative. You can test this by simply renaming the project folder (not while the project is open obviously). It will still compile without error and the Initialization file will automatically update to reflect this change. The relative file paths shown in the Initialization file are expanded for no reason other than I like to see exactly where they live. If you make sure all your files are in the project folder or sub folders (Code in the Code folder etc  ::) ), then it should be fully portable.

QuoteI have no problems with it (except the strict #include statement policy)

I do take onboard what you're saying but by simply excluding a file from the Initialization file means you get to include it where ever you like. I guess it just takes a bit of getting used to.

Daren
Title: Re: Konstruct Code Editor - Freeware
Post by: Petr Schreiber on March 03, 2011, 08:58:01 AM
Thanks for the info Daren,

you are right, I might be not used to the concept yet.

Your concept for relative paths converted to full for better clarity is nice, I thought full paths are "hardwired", but this way it is ok.
I will try to keep your advices in mind for future, thanks a lot!


Petr
Title: Re: Konstruct Code Editor - Freeware
Post by: Bob Houle on March 05, 2011, 04:34:18 PM
Hi Daren,

While I love this editor and it is rock steady... reasons that keep me from using it for "everything".

#1 - PBForms (I don't think that there's much you can do here)

#2 - small code snippets on the forum.

It's nice to grab the code, and test it out without having to start a new project, etc.

Perhaps you could have a new topic on the left side of the screen (under Start Menu) called: "Open Editor" that simply opens the editor, supplies a blank screen and allows you to compile a sample, much like the PB editor does.

While it 'bypasses' the prime reason I like to use KONSTRUCT.. a quicky solution is sometimes better. {grin}

--Bob
Title: Re: Konstruct Code Editor - Freeware
Post by: José Roca on March 05, 2011, 06:12:46 PM
Quote
It's nice to grab the code, and test it out without having to start a new project, etc.

It's even nicer to test it without having to save it to a file :)
Title: Re: Konstruct Code Editor - Freeware
Post by: Bob Houle on March 05, 2011, 06:20:32 PM
 :D
Exactly!

I have that in another editor.

Ctrl-C    'grab the code
Ctrl-V    'paste the code
F5         'execute the sample

Done!

If it's any good I save the code (with proper accreditation, of course)  :)


-Bob





--Bob
Title: Re: Konstruct Code Editor - Freeware
Post by: José Roca on March 05, 2011, 06:48:09 PM
Editors are a highly personal choice. A feature that is life saving for you, its worthless for another. It is good to have many available choices, so Konstruct is very welcomed.

Currently, I'm using CSED (Customized SED), a new editor that I began to write mainly to test the new features of the upcoming compilers and my new headers for them. It is not a replacement for SED, but a personal editor in which I have removed anything I don't use and added some features useful to me. The code is much cleaner (just one global variable, a reference to an instance of the main class) and supports unicode via UTF-8 encoding. For projects, I'm using a modified version of Lynx. I will make the code available just in case somebody wants to use it as a basis to write his own customized editor.
Title: Re: Konstruct Code Editor - Freeware
Post by: Bob Houle on March 05, 2011, 06:54:00 PM
Always interested in seeing other editors... like you say: They are quite personal... everybody has an opinion on what's good.

I like the concept of KONSTRUCT because it integrates project coding so smoothly and naturally.

Just the thought of creating anew folder, locating scattered files, creating a sub-folder for the release, etc can be daunting.

--Bob
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on March 06, 2011, 05:30:51 AM
Bob,

Quote#1 - PBForms (I don't think that there's much you can do here)

I dont own PBForms so I've no idea how I would integrate it if thats at all possible.

Quote#2 - small code snippets on the forum.
It's nice to grab the code, and test it out without having to start a new project, etc.

I'll probably add a switch that disables the automatic initialization. This will enable you to simply copy, paste and compile code snippets without the problem of metastatements clashing.

You will still have to create a new project but I cant see that being too much of an inconvienience considering you're not forced to name it and it will automatically clean up should you choose not to keep the code.
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on March 08, 2011, 01:38:49 AM
Minor update added.

Quote-------------------------------------------------------------------------------
Version 1.2.2.0 - Mar 7 2011
-------------------------------------------------------------------------------
#Files modified from previous update:
Konstruct.exe

---------

#Feature Added.
Right click Menu on Project node in treeview

---------

#Feature Added.
Right click Menu on Editor tabs

---------

#Feature Added.
Initialization switches to enable\disable automatic code generation for
Include file paths.

---------

#Feature Added.
Menu item. 'Open file' using the currently selected text as the file name.
eg. Right click when "Win32API.inc" is selected.

---------
#Bug Fix.
Find using F3 didn't scroll correctly if a match was found in a collapsed procedure.

---------
Title: Re: Konstruct Code Editor - Freeware
Post by: Brice Manuel on March 08, 2011, 06:35:52 AM
This might possibly be the best PB-specific IDE out there.  You have done a really good job with it!

I only have one (and only one) complaint about this great IDE, unfortunately, it is one that keeps me from using it.  You can't choose custom colors for syntax coloring, you can only choose from a predefined list.  It is not as limiting as JellyFish in the listed colors, but it is still limiting enough that I can't use the coloring scheme I want to and hence would not use this IDE.  Since this IDE was made for your own use and you were nice enough to share it with others, please do not take this as a feature request, as it is not.
Title: Re: Konstruct Code Editor - Freeware
Post by: Petr Schreiber on March 08, 2011, 09:15:11 AM
Hi Daren,

thank you very much for new release, I like it very much.
I also agree it is nice to have possibility of choice.


Petr
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on March 08, 2011, 03:00:18 PM
Thanks guys for the feedback.

I'll add customs colors to the ToDo list, its not an unreasonable request.
Title: Re: Konstruct Code Editor - Freeware
Post by: Denis Gura on March 08, 2011, 06:21:28 PM
Nice work Daren.

What about:

Compare 2 sources of code:

1) set the 1. position in the source
2) set the 2. position in the source (could be another file in project)
3) start compare pressing Fx
4) find the first difference
(inteligent spaces & tabs & CrLf & comments etc. are ignored)
set up in 1.windows position to see
set up in 2.windows position to see
mark color difference
5) stop looking with shift+Fx

maybe usefull.
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on March 08, 2011, 07:48:08 PM
Thanks Denis.

It's a good idea but that sort of addition is a little way down the road for me just yet. I'm currently looking to enhance\refine core functionality with the little spare time I have. That said, all suggestions are welcome so if you have any other ideas then please post.

Daren
Title: Re: Konstruct Code Editor - Freeware
Post by: José Roca on March 08, 2011, 08:48:31 PM
There are already free tools to compare file contents.

A very good one, that I use to update the Windows API Headers, to find the differences between the latest SDK and the previous one used, is WinMerge:

http://winmerge.org/

If you install the Windows SDK, then you can also use WinDiff.
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on March 09, 2011, 02:43:14 PM

Can anyone tell me if PB Forms is invoked by passing the name of a file in the commandline?
I was wondering if it was simply a case of each time the file was saved in either app, you would get the usual 'File modified, reload, blah, blah' message in the other app?

If both are true, would someone be kind enough to post the code for a basic dialog. No Buttons or anything, just the minimum code generated by PB Forms.

Thanks.
Title: Re: Konstruct Code Editor - Freeware
Post by: José Roca on March 09, 2011, 04:19:54 PM
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)
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on March 09, 2011, 04:46:10 PM
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.
Title: Re: Konstruct Code Editor - Freeware
Post by: Bob Houle on March 09, 2011, 04:48:50 PM
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 (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.
Title: Re: Konstruct Code Editor - Freeware
Post by: José Roca on March 09, 2011, 05:43:11 PM
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.
Title: Re: Konstruct Code Editor - Freeware
Post by: Chris Boss on March 09, 2011, 08:11:29 PM
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.

Title: Re: Konstruct Code Editor - Freeware
Post by: Theo Gottwald on March 10, 2011, 11:33:34 AM
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.
Title: Re: Konstruct Code Editor - Freeware
Post by: Patrice Terrier on March 10, 2011, 11:41:05 AM
Visual Studio (the reference for me) is project oriented only ;)

...
Title: Re: Konstruct Code Editor - Freeware
Post by: Theo Gottwald on March 10, 2011, 11:45:20 AM
You got my point, Patrice. Daren's Editor should go this direction.
Teamwork, Versioning etc.
Title: Re: Konstruct Code Editor - Freeware
Post by: Brice Manuel on March 10, 2011, 12:23:49 PM
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.
Title: Re: Konstruct Code Editor - Freeware
Post by: José Roca on March 10, 2011, 03:22:22 PM
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.
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on March 10, 2011, 05:40:53 PM
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!
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on March 10, 2011, 06:35:29 PM
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
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on April 02, 2011, 01:20:45 PM
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.
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on April 02, 2011, 04:22:28 PM

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!
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on April 05, 2011, 03:28:02 PM
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?
Title: Re: Konstruct Code Editor - Freeware
Post by: José Roca on April 05, 2011, 04:23:32 PM
Plugin support ws added to SED a long time ago and nobody has written plugins for it...
Title: Re: Konstruct Code Editor - Freeware
Post by: Bob Houle on April 09, 2011, 06:29:32 PM
Daren,

What is the criteria for using WinApi include files?

I was under the impression that by setting the path to Jose's WinApi files everything I needed was available to Konstruct.

I wanted to open a folder that I'm working with and it would not compile with version PBWin10 saying that it could not find "Shellexecute".

for example:

'Open the directory so that I can see if it's been done
       ShellExecute(0, "Open", Exe.Path$, $Nul, $Nul, %SW_RESTORE)


I solved it by using the "Add File" procedure in Konstruct.

Question is:
Since Konstruct uses #Optimize Code On... why doesn't "Windows.inc" get added automatically?


Thanks,
--Bob
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on April 10, 2011, 03:07:01 PM
Hi Bob,

#Optimize Code On doesn't automatically add all of Josés files. You still need to select which API files you want included. (Select Initialize.bas in the Treeview, hit the 'Active API Files' button in the property grid and you'll see a list of Josés files.

José provides 'Win32API.inc' for compatability which include does include 'Windows.inc' and this is automatically added to a new project.
I tested it by starting a New Project, adding your code and it compiled fine.
Title: Re: Konstruct Code Editor - Freeware
Post by: Theo Gottwald on May 02, 2011, 08:28:41 AM
QuotePlugin support ws added to SED a log time ago and nobody has written plugins for it...

Jose, i have thought about that statement. Many of the PB'er are a bit shy to post their code in the public.
Possibly there are a lot of Add Ons - but you'll not get to see them.

Having said that, SED can do 99% of whats needed, and don't ask me right now if there is something missing or what.
Therefore not so many people will want to add an "AddOn".

Title: Re: Konstruct Code Editor - Freeware
Post by: José Roca on May 02, 2011, 11:49:23 AM
I will post an updated version of SED when I will finish with the headers. You can do with its code whatever you wish. But CSED is another history: I'm using in it exclusively my own code and my own solutions (no more having to update other people's code that I don't fully understand how it works). I'm not going to add features for the sake of it. If you want a Find in Files tool, you can use Gotcha or any of the free or comercial tools available. No need to implement one in the editor. If I had to implement all the suggestions, I could not do anything else, and the headers, wrappers and classes in which I'm working are far more important than an editor, a COM browser or any other tool, even if most PBer's haven't realized it yet.
Title: Re: Konstruct Code Editor - Freeware
Post by: José Roca on May 02, 2011, 12:13:50 PM
 
And since this is a thread for the Konstruct Code Editor, it's not the place to talk about SED or CSED. I thank very much Daren for having chosen this forum to host his great editor. As I said before, Konstruct is more suitable for projects that require many include files and resources, and CSED is more suitable for the kind of work that I do, i.e. to deal with thousands of small, unrelated files.
Title: Re: Konstruct Code Editor - Freeware
Post by: Theo Gottwald on May 03, 2011, 08:12:07 AM
Teamwork, versioning, project orientation is still a domain of MS and VS.
Actually Daren's Editor is just a first step into this direction.
I hope fpr PB he'll go on with its developement.

Reading the ad's for VS, there is no word about "optimized code" or "executable size".
They talk about teamwork, project schedules etc.
This is what companies want to talk about.
Title: Re: Konstruct Code Editor - Freeware
Post by: Brice Manuel on August 15, 2011, 02:27:30 AM
Does anybody have a non-corrupted ZIP download for the last version of Konstruct?
Title: Re: Konstruct Code Editor - Freeware
Post by: José Roca on August 15, 2011, 05:49:25 AM
I have sent a PM to Daren.
Title: Re: Konstruct Code Editor - Freeware
Post by: Brice Manuel on August 15, 2011, 04:42:34 PM
Thank you.
Title: Re: Konstruct Code Editor - Freeware
Post by: Daren Oliver on August 16, 2011, 02:28:39 PM
I've replaced the corrupted file with a working one now. Sorry for the delay, its summer here I'm mostly out doing other things while I have the chance. That said, its starting to turn colder here now so I'll be back on Konstruct very soon!
Title: Re: Konstruct Code Editor - Freeware
Post by: Brice Manuel on August 16, 2011, 02:32:17 PM
Darren:  Thank you very much.  I really appreciate it.  :)