ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Deozaan's Simple Text Editor

(1/2) > >>

Deozaan:
I've recently started learning how to use the Godot Engine. It's a game engine, but it can be used for non-game apps as well. As a means of familiarizing myself with Godot, I have been working on some simple projects.

The first one I made is a simple text editor. I started out just following a tutorial series on YouTube and then I added a few more features until I lost interest and was ready to move on to something else.

Deozaan's Simple Text Editor

Considering it's my first complete project in Godot, I expect there are plenty of bugs. And I certainly don't expect it to compete with the likes of Notepad++, or even Microsoft Notepad, for that matter.

Jotti says it's clean.
VirusTotal says it's clean.

You can download it from my Keybase: https://keybase.pub/deozaan/SimpleTextEditor/

Just thought I'd share with anyone here who might be interested. :Thmbsup:

Oh, and right now I only have a Windows build available for download. But if anyone is interested in Linux or MacOS builds, let me know and I can supply those as well.

KodeZwerg:
I will check out your experiment! (12mb is a bit big, first impression ^^)

Lets see if hardware accelerated text editing make my day  :D

KodeZwerg:
More impressions:

I loaded a .txt file.

Deozaan's Simple Text Editor

Window Caption/Title is wrong, file has a name, trust me :)
Your counters are not working? All say 0, as you can see their is text.
Opening Microsoft Word files = Application Crash.
On some flles the vertical scroll does not work correct, When I am at EOF the line is behind your statusbar.
Program messes around with my Registry/NVidia/OpenGL settings by creating keys.
Everything is a bit too dark. Dark Menu on Dark Background... (maybe add a lightgray border to have it more seperated)
There will be a file created (prefs.dat), does not work if running inside Windows protected folders!
Save As: Does not offer any text formats (Ascii, Ansi, UniCode etc.)

Alot to do, but crazy whats possible with 3d-Engine  8)

Deozaan:
I will check out your experiment! (12mb is a bit big, first impression ^^)
-KodeZwerg (March 19, 2021, 05:31 PM)
--- End quote ---

Thanks for checking it out. :D I guess the 12 MB is due to it being a complicated game engine with custom UI stuff rather than just some native OS UI and code. If I used .7z format I could get it down to about 8 MB, but I opted for .zip format for maximum compatibility.

I really wasn't intending on working on this project further, but it seems you've found a lot of bugs that need fixing!

I loaded a .txt file. Window Caption/Title is wrong, file has a name, trust me :)
-KodeZwerg (March 19, 2021, 06:26 PM)
--- End quote ---

Strange. I was pretty sure I had that working. But I see that it is indeed broken for me, too.

Fixed in the new release.

Your counters are not working? All say 0, as you can see their is text.
-KodeZwerg (March 19, 2021, 06:26 PM)
--- End quote ---

The counters work, but I forgot to have them update when loading a file. :-[ If you press any key it will immediately update the counts.

Fixed in the new release.

Opening Microsoft Word files = Application Crash.
-KodeZwerg (March 19, 2021, 06:26 PM)
--- End quote ---

This is designed for plaintext only. But it probably shouldn't crash when an unsupported format is loaded. Upon further investigation, it looks like I made a mistake in attempting to gracefully handle errors when loading files. It was confusing because printing the error (which is an integer) to the debug log will automatically convert it to a string. But I attempted to add a more helpful message to the log and concatenate the error to the message, not realizing that string concatenation doesn't automatically cast the integers to strings.

In other words, I think the crash was caused by an error in the code meant to display useful information about an error that had been handled gracefully. ;D

I believe I've got this fixed for the new release.

There will be a file created (prefs.dat), does not work if running inside Windows protected folders!
-KodeZwerg (March 19, 2021, 06:26 PM)
--- End quote ---

Good point. I was attempting to make it run "portably" and just write everything in the same directory as the executable. I didn't think about people putting it inside protected folders.

It will write to the user directory (AppData/Roaming/Deozaan/SimpleTextEditor) in the new release.

On some files the vertical scroll does not work correct, When I am at EOF the line is behind your statusbar.
-KodeZwerg (March 19, 2021, 06:26 PM)
--- End quote ---

Ah yes, that's interesting. It seems it doesn't always automatically scroll down to keep the caret visible. The scroll bar functionality is all built-in stuff that Godot provides. I don't know how to change it. But what I've noticed is that it has something to do with the height of the TextEdit UI control. So, for the new release I've changed the default window size which should make it automatically scroll to keep the caret visible at all times. Unless you resize the window, of course.

But since the window size is saved/loaded to prefs.dat, you may need to use the View -> Reset Window Size/Position menu item to get it to the default size again.

Program messes around with my Registry/NVidia/OpenGL settings by creating keys.
-KodeZwerg (March 19, 2021, 06:26 PM)
--- End quote ---

It does? So much for running it portably... I'm not sure I have any control over that. It may be something Godot does on its own. But if you can tell me what changes it makes I can look into whether or not I can prevent that from happening.

Everything is a bit too dark. Dark Menu on Dark Background... (maybe add a lightgray border to have it more seperated)
-KodeZwerg (March 19, 2021, 06:26 PM)
--- End quote ---

Can you be more specific about this? Yes, the backgrounds are dark, but the foreground text is light, which should result in decent contrast and easy readability.

Save As: Does not offer any text formats (Ascii, Ansi, UniCode etc.)
-KodeZwerg (March 19, 2021, 06:26 PM)
--- End quote ---

I think I'm going to file this one as "working as intended" since I have no plans to support anything except UTF-8 format.



I've uploaded v1.210320.0 with the aforementioned fixes to my KeyBase: https://keybase.pub/deozaan/SimpleTextEditor/

Jotti says it's clean.
VirusTotal says it's clean.

KodeZwerg:
Opening Microsoft Word files = Application Crash.
But it probably shouldn't crash when an unsupported format is loaded.
I believe I've got this fixed for the new release.
-Deozaan (March 20, 2021, 02:35 AM)
--- End quote ---
Bad news.
On more testing, more things happen.
Errorhandling should be improved.
I did try open files that are not supposed to be opened by your program.
Program will freeze and can not be restarted after I terminate process.
I needed to go into my /user/.... folder and delete prefs.dat and logs folder, otherwise program is not able to run anymore. It simply does nothing.
My suggestion: limit file dialog filter to *.txt and not *.*.
-KodeZwerg
--- End quote ---
-KodeZwerg (March 19, 2021, 06:26 PM)
--- End quote ---
//edit
Another suggestion: When opening Editor and try load a file, filedialog starts in my \user\... folder where the prefs.dat file is.
Let is open from \Documents\ or folder where the .exe is.
//end edit

Program messes around with my Registry/NVidia/OpenGL settings by creating keys.
But if you can tell me what changes it makes I can look into whether or not I can prevent that from happening.
-Deozaan (March 20, 2021, 02:35 AM)
--- End quote ---
No adjustment needed, I will apply image to that subject.
Deozaan's Simple Text Editor
That is okay. You do not have possibilites to avoid such, that is the used 3d-Engine.
-KodeZwerg
--- End quote ---
-KodeZwerg (March 19, 2021, 06:26 PM)
--- End quote ---

Everything is a bit too dark. Dark Menu on Dark Background... (maybe add a lightgray border to have it more seperated)
Can you be more specific about this? Yes, the backgrounds are dark, but the foreground text is light, which should result in decent contrast and easy readability.
-Deozaan (March 20, 2021, 02:35 AM)
--- End quote ---
I will add Image to that subject.
Deozaan's Simple Text Editor
If Border would be lightgray from menu, the visual content would not look "melted" (?)
-KodeZwerg
--- End quote ---
-KodeZwerg (March 19, 2021, 06:26 PM)
--- End quote ---

All other mentioned things are fixed as far as i did test!!!

I hope this helps, no criticism at all, as said, crazy what you can do with a framework that is not designed to do such!!! Got my respect for that +1

Navigation

[0] Message Index

[#] Next page

Go to full version