Join us on Discord!
You can help CodeWalrus stay online by donating here.

SynText - A Program, Note, and App editor for the HP Prime [HP Prime][HP PPL]

Started by alexgt, November 12, 2015, 03:24:30 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alexgt

No stuff edited with SynText will look great in the built in prog editor and visa versa. So if you make a new line in SynText it will also make a new line in the prog editor so no one long line in the regular editor of all your source if you are wondering.

I store all the lines into a list like this:
{line1,line2,line3,...lineN}
each of the lines end with a new line (even though you cannot see it).

when the user is done using the editor and hits save it uses this code

ProgStr:="" //Stores empty string into ProgStr making the var into a string
//Line Count is amount of lines in the program

FOR A FROM 1 TO LineCount DO
   ProgStr:=ProgStr + LineList(A) //LineList is the list with all the lines in the program each element containing its own line.
END;

That takes the list with all the lines of source and knits them back together forming the edited program. What you see in SynText you will see exactly the same stuff in the   regular editor. This I already have implemented and now I need to make the menu where you choose the program to edit and to add the editor then it will be useable ;)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

alexgt

New Update!!!
Added:
- TouchScreen menu!!!
- Esc to makes program into a list of all source lines

Bugs Fixed
- Stopped defragmentation at first new line

Bugs Created:
- To work you need at least 15+ programs already on your calc (working on this one :P)

Next Update:
- Fully functional menu able to show all programs
- Maybe some more :P

DOWNLOAD IN FIRST POST (v0.06)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

Cool, I'll give it a try when I get some chance. By the way, does it have loading bars like in MinePrime when opening programs if it takes a while? Sometimes I open large programs in the default editor and since it doesn't show progress I always think my calc froze.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

Yeah, I will add that but right now I am putting together the bare necessities so-to-speak which I now have. Next step is completing the menu and adding the editor then it will be useable ;). Then I start on MinePrime (again <_<) making it allot neater, readable, commented, and optimized! While I am starting on MinePrime progress will slow on SynText and possibly I will start on a on calc pixel art program so I can edit sprites on the go. That is the plan but you know how plans go <_<
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

I wonder how hard it would be to implement a search function?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

I have been keeping that in the back of my mind and I don't think it would be that difficult actually, depending on how far the word is from the start it could take a while for bigger programs <_<
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

YEah I figured so. It would probably still be useful, though.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

If you are searching a program that is 30kb then it will take like 3 seconds so not that bad
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

Interesting, I would have thought it was faster considering it seemed fast on the FX-9860G. But again, Casio programs are token-based, so perhaps that's why?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

Well to has to to go through every line and in a 30kb program ant that would ~ be 800 + lines if it was all in the constraints of the screen. And I have to go through every line searching for the key words.
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

I'm thinking it has something to do with code not being tokenized. On the HP Prime, TEXTOUT() is 9 characters, while on the TI-84+, Text( is just 1 character and the closing parentheses can be omitted.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

That would only help with syntax highlighting the way I am doing it. But it would not help with saving since I would still have to go down the list and put all the strings together.
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

That sounds quite complicated. Either way, good luck with this project and I really need to give the latest version a try when I have extra free time. :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

Nah you don' have to it is really only a glithed out versions that crashes because of a bug I fixed a while back. Once I can display some text I will release a worth-while one ;)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Powered by EzPortal