NOTE: This version is outdated. The latest version can be found here.

I have been working on a Basic program editor using Celtic CE for a while and feel that I am committed enough to post about it.

Here's what's working:
- Program name input screen
- Ability to skip program input by storing the program name to Str0 and pi to A
- Displaying 13 lines of a program
- Displaying the program name
- Slow and buggy line wrap
- Three different keyboards toggled with [alpha] and basically non functioning typing.
- Moveable (and buggy) cursor
- Ability to delete, clear, and backspace lines, as well as insert blank new ones.
- Line fencing (no scrolling too far up or down)
- Probably more that I haven't thought of

To do:
- Moving cursor in the x and not just the y direction direction and inserting things into the middle of a line.
- Option to create a program if it isn't found
- Ability to edit Celtic appvars as well as just programs
- If possible, make line wrap faster, because it's really slow right now
- Customizable theme (currently super dark mode) and settings menu
- Stopping people from editing non Basic programs.
- Squash bugs, optimize, and more that I can't think of
- Allow unarchiving, and unlocking to edit the program and restore the original state after exiting the editor

I am open to alternative name suggestions
If you want to see the SourceCoder project, here it is.
And then there were three. This makes the third alternative program editor that is in development (that I know of). Sounds like great progress so far, keep it up! Is there any particular aspect that you want your editor to excel in?
jasper7474 wrote:
Is there any particular aspect that you want your editor to excel in?


Hmm. Not sure about any specific aspect, but I kind of just want to put something out there, as this is my first in depth project, but I kind of just want to be the first to get a program editor working. My main concern is speed and I worry that as I add more and more code, it'll slow to a crawl.

EDIT: a screenshot
https://i.ibb.co/XpT7dwV/screenshot-PIEDITOR.png

The cut off "quit" is from the emulator, and does not happen on the calculator
This looks great. I'm always excited to see more Celtic ce projects. you could potentially collaborate with TIny_Hacker to use his spriter program in you program editor so that users could create program icons within your program.
Calculatordream wrote:
You could potentially collaborate with TIny_Hacker to use his spriter program in you program editor so that users could create program icons within your program.


Good idea. What level of integration were you thinking of? Like, just running the program or something else like temporarily modifying the Spriter saving code? Would it be for just 16x16 bufsprite icons or for sprites of any size and palette?
It could also check for the DCS9IC program and use that if Spriter isn't installed.

Where should I host the source code so that I can get feedback? GitHub, or elsewhere?

EDIT: I released the current version on GitHub here
I was thinking it would run the program and copy the hex string directly to the beginning of the code in your editor as an icon.
Calculatordream wrote:
I was thinking it would run the program and copy the hex string directly to the beginning of the code in your editor as an icon.


What about if the user chooses to save it to a program, but not the program that is getting edited currently. Just let it do that? Also, how would the editor know whether the user saved it to a string, or to the program itself?

Also new pre release
You could directly edit Spriter to copy the hex string to the beginning of the code without giving the user any other options.
Calculatordream wrote:
You could directly edit Spriter to copy the hex string to the beginning of the code without giving the user any other options.

Good idea, I'll start on spriter support soon. Maybe it should just copy Spriter to a temporary program in case something goes wrong.
New pre-release.
Another new pre-release here
Two new bug fixing pre releases on GitHub.
pi644721 wrote:
Two new pre releases on GitHub.
What's new? It looks like maybe bug fixes? Please add some details here!
KermMartian wrote:
pi644721 wrote:
Two new pre releases on GitHub.
What's new? It looks like maybe bug fixes? Please add some details here!

Oh! I didn't see this until now. Sorry! I should be better about update descriptions.

The new versions are both bug fixes, 0.4.16 is the main branch, and 0.4.16.1 is a branch that uses SetParseLine() commands to see if there are any speed improvements.
I don't think that there is any speed difference because most of the time to draw the screen is in the actual line drawing, not the code structure.

What's up next: remove the settings menu and replace it with a button to toggle light/dark mode, add cursor movement along the lines, and proper support for Spriter.
New version on GitHub.

Changes in this version:
- Removed the settings menu and replaced it with a "Theme" button to invert the colors.
- Added a better input screen, support for editing Celtic appvars, and blocking the editing of non TI-Basic or ICE Source programs.
- Fixed a memory leak when jumping out of If:Then statements using SetParseLine().

Unfortunately I could not get to working on Spriter support or better cursor movement, I'll start working on those soon. Hopefully I can get the whole thing finished enough for a full release soon.

I might revert back to use the old menu because the new one adds a lot of bloat.
Here's a screenshot of the new menu while it's here.
Nice progress! This is really shaping out to be a pretty cool program. I like the new menu a lot, though how much bloat are we talking exactly? Either way, it looks nice, keep up the great work!

Good luck with Spriter integration! Be sure to let me know if there's any simple stuff I could change with the program to make it more useful to your editor as well Smile

One other suggestion: Have you considered uploading source files to GitHub as well, not just releases? The easiest way to do this for TI-BASIC is to upload and copy the source from something like SourceCoder, then paste it into a text file. When you're done, you can change the file's extension from .txt to .8xp. GitHub will still see the text, but it will register it in the languages as a TI Program and not just a text file.
TIny_Hacker wrote:
I like the new menu a lot, though how much bloat are we talking exactly? Either way, it looks nice, keep up the great work!

I think somewhere around 2kb, and the rest of the program (so far) is about 3kb. So yeah, I think that's a lot of bloat. I was thinking about adding a menu for recently edited files, which this menu doesn't even have yet. An alternative that I was thinking about was just using the Menu( command.

TIny_Hacker wrote:
Good luck with Spriter integration! Be sure to let me know if there's any simple stuff I could change with the program to make it more useful to your editor as well Smile

I was just thinking of copying Spriter, and using InsertLine( to change the saving code. I would kind of like the Spriter integration to be backwards compatible, but maybe it could only support a new version with special support. If you wanted to change some things for integration, maybe when a user presses save, if a certain variable was set to some value, it would just return the sprite in Ans. It would need to support skipping the main menu, or have some special menu, or maybe PiEditor could have a menu to select the palette, and size so that it could be properly loaded.

TL;DR I don't think that there would be any simple things that you could change to make integration easier.

TIny_Hacker wrote:
One other suggestion: Have you considered uploading source files to GitHub as well, not just releases? The easiest way to do this for TI-BASIC is to upload and copy the source from something like SourceCoder, then paste it into a text file. When you're done, you can change the file's extension from .txt to .8xp. GitHub will still see the text, but it will register it in the languages as a TI Program and not just a text file.

There's a link to the SourceCoder project in the first post, but here's another.
A suggestion for later on:
You could make a command to create custom variables. Calculators support custom variables and making a custom command for that would make designing programs much easier, also you could make the naming screen much smaller by condensing the appvar creation into the command.

Edit: If what I said doesn't make sense, please forgive me. I am not the best with words. :/

Custom variables as in a command (example from AXE: GetCalc("appvSAV",50)) That can create appvars inside the program instead of separately. (AXE already does this though.)

P.S. I code in AXE so sorry if I sound biased.
DragonScholar71 wrote:
A suggestion for later on:
You could make a command to create custom variables. Calculators support custom variables and making a custom command for that would make designing programs much easier.

Just to be clear, this is an editor for TI-Basic programs and Celtic appvars, not a language. I also do not understand what you mean by custom variables.

DragonScholar71 wrote:
You could make the naming screen much smaller by condensing the appvar creation into the command.

The size is so big because it uses Celtic CE drawing commands and is over complicated, not because the program and appvar inputs are two separate blocks of code. I'm planning to make it smaller by just using Output( commands.
pi644721 wrote:
DragonScholar71 wrote:
A suggestion for later on:
You could make a command to create custom variables. Calculators support custom variables and making a custom command for that would make designing programs much easier.

Just to be clear, this is an editor for TI-Basic programs and Celtic appvars, not a language. I also do not understand what you mean by custom variables.

DragonScholar71 wrote:
You could make the naming screen much smaller by condensing the appvar creation into the command.

The size is so big because it uses Celtic CE drawing commands and is over complicated, not because the program and appvar inputs are two separate blocks of code. I'm planning to make it smaller by just using Output( commands.

Even though it is an editor, you could still put the appvar creator in a separate menu accessible from the actual text editor. Kind of like a tools menu.
I don't see why there needs to be a menu to create appvars, just use det(4) (a Celtic command to create a file). The menu for inputting the file that the user wants to edit will be able to create a file if it isn't found. See top:
Quote:
- Option to create a program/appvar if it isn't found
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement