• Jens' Script Editor - An on-calc lua editor 5 2
Currently:  

Author Topic: Jens' Script Editor - An on-calc lua editor  (Read 54866 times)

0 Members and 2 Guests are viewing this topic.

Offline Jens_K

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 186
  • Rating: +52/-0
    • View Profile
Re: Jens' Script Editor - An on-calc lua editor
« Reply #210 on: October 27, 2014, 05:15:58 pm »
@Adriweb: Thank you for keeping the ti-planet article updated; I would do it myself if I could speak french  ;) . Oh and I noticed that you apparently mistakenly translated and pasted the post of the older beta 1 version...


@LDStudios: You're right, I thought it would be bigger; I'll include it in the main file next update. I have to leave it on a seperate page from the other guide page though, because I already used all available toolbox items on this page and I can't dynamically change the menu's content on OS 3.1
Sorry for nonsense.

Projects:



Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Jens' Script Editor - An on-calc lua editor
« Reply #211 on: October 27, 2014, 05:34:42 pm »
@Adriweb: Thank you for keeping the ti-planet article updated; I would do it myself if I could speak french  ;) . Oh and I noticed that you apparently mistakenly translated and pasted the post of the older beta 1 version...
damn it that's why it looked familiar lol
Will fix soon, thanks.
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Jens_K

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 186
  • Rating: +52/-0
    • View Profile
Re: Jens' Script Editor - An on-calc lua editor
« Reply #212 on: November 27, 2014, 02:39:13 pm »
Ok, here it is: Version 2.0 is finished!
I really don't have much time lately due to last-schoolyear-before-a-levels-related-stuff, but I definitely wanted to finish it before the end of ticalcs nomination november, so maybe I rushed this final release a bit... Anyways, here's the changelog:

New:
- New tool to change indentation width of your code (especially useful when copy&pasting code from/to other editors)
- You can now enter commands during runtime by pressing enter on a console app (which imo is a really cool feature)
- The editor will restore its saved state (including code and cursorposition)

Improvements:
- Rearranged menu so that it's more clear
- The advanced lua/physics guide is now on page 1.4 of the main file (it is still not finished)

Fixes:
- Setmetatable function now returns the new table properly
- Full module support (previous fix didn't work)
- Initalization functions (like on.resize and on.activate) are called more accurately (metatable event handlers are now only called once) and are crash-protected on OS 3.1
- various bugfixes due to code revision

Code Cleanup:
- A new settings loading/storing module manages settings now
- More comments
- Revised some older parts of the code

The attached archive contains both JSE files for OS 3.1 and OS>3.1, controls pictures of both Nspire layouts and a readme.txt
PS: I will upload it to ticalc.org and update the first post of this topic with a full v2.0 changelog as soon as I have the time for it  ;)
Sorry for nonsense.

Projects:



Offline DJ Omnimaga

  • Now active at https://codewalr.us
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55821
  • Rating: +3151/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: Jens' Script Editor - An on-calc lua editor
« Reply #213 on: November 28, 2014, 06:27:36 pm »
Good job on this :D
In case you are wondering where I went, I left Omni back in 2015 to form CodeWalrus due to various reasons explained back then, but I stopped calc dev in 2016 and am now mostly active on the CW Discord server at https://discord.gg/cuZcfcF


Bandcamp|Reverbnation|Facebook|Youtube|Twitter

Offline mdr1

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 303
  • Rating: +21/-2
    • View Profile
Re: Jens' Script Editor - An on-calc lua editor
« Reply #214 on: December 08, 2014, 12:18:04 pm »
Thanks again for this editor!

Though, in JSE 2.0, there is no menu and clicking on the right key at the start menu (choose between a touchpad, clickpad or computer) throws the following error:



About the autompletion menu, should it be possible to auto-activate it? And some keywords like "function" or "for" should come with a space.

EDIT: I achieved to show the menu: just go to the home screen and then return to the document.



Offline Jens_K

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 186
  • Rating: +52/-0
    • View Profile
Re: Jens' Script Editor - An on-calc lua editor
« Reply #215 on: December 08, 2014, 01:46:54 pm »
Ok, it's now finally on ticalc.org, although it seems like I was too late for POTY  :/

@mdr1: Thanks for the reports (I don't have acces to OS 3.1, so I can't debug it)! I think I know how to fix the menu; if you have acces to the code via the student software you can fix it like this: Put "createMenu()" somewhere in the end of the code, to call it during initialization. I will also fix this in the next update.
The other problem with the start menu is more difficult to solve, because I don't have much information about it and right now I can't think of any possible cause... Does this error only occur on this dialogue? What about using [tab] or other arrow keys?

PS: I now have updated the first post with current screenshots, current version and stuff.  ;)
Sorry for nonsense.

Projects:



Offline LDStudios

  • Coder Of Tomorrow
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 388
  • Rating: +41/-1
    • View Profile
    • LD Studios
Re: Jens' Script Editor - An on-calc lua editor
« Reply #216 on: December 08, 2014, 03:01:54 pm »
Ok, it's now finally on ticalc.org, although it seems like I was too late for POTY  :/

@mdr1: Thanks for the reports (I don't have acces to OS 3.1, so I can't debug it)! I think I know how to fix the menu; if you have acces to the code via the student software you can fix it like this: Put "createMenu()" somewhere in the end of the code, to call it during initialization. I will also fix this in the next update.
The other problem with the start menu is more difficult to solve, because I don't have much information about it and right now I can't think of any possible cause... Does this error only occur on this dialogue? What about using [tab] or other arrow keys?

PS: I now have updated the first post with current screenshots, current version and stuff.  ;)
Shame its so late, this would completely deserve a POTY (IMO). I would recommend removing the earlier version from ticalc so that people don't get confused and so that everyone downloads the newest version.



Offline Jens_K

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 186
  • Rating: +52/-0
    • View Profile
Re: Jens' Script Editor - An on-calc lua editor
« Reply #217 on: December 08, 2014, 03:53:50 pm »
@LDStudios: Yes, I sent an email to the ticalc staff on the 28th November, pointing out that I want to replace the old file and participate on POTY, but I still didn't get an answer... Seems like they were busy
Sorry for nonsense.

Projects:



Offline DJ Omnimaga

  • Now active at https://codewalr.us
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55821
  • Rating: +3151/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: Jens' Script Editor - An on-calc lua editor
« Reply #218 on: December 15, 2014, 01:23:18 pm »
Yeah a lot of programs were missed for this year's nomination november it seems. D: Hopefully POTY 2015?
In case you are wondering where I went, I left Omni back in 2015 to form CodeWalrus due to various reasons explained back then, but I stopped calc dev in 2016 and am now mostly active on the CW Discord server at https://discord.gg/cuZcfcF


Bandcamp|Reverbnation|Facebook|Youtube|Twitter

Offline Jens_K

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 186
  • Rating: +52/-0
    • View Profile
Re: Jens' Script Editor - An on-calc lua editor
« Reply #219 on: February 11, 2015, 10:14:27 am »
Hi again! I'm back to programming after a longer break for the A-level and stuff. So here's version 2.1 of JSE (New Version is attached to first post):

New:
- Status Bar
  - enable/disable in "General Settings" Menu
  - displays current name of the script and status of the editor

Improvements:
- Completed Physic API Guide (I had to shorten it a bit)
- Revised Console:
  - You can now copy lines from the console to the clipboard
  - Console now supports line-breaks
  - Console now always remembers the last 100 lines and monitoring-settings
  - Console now scrolls automatically through long lines
- Keywords like "function" or "for" come with a space after inserting from the acutocompletion menu

Fixes:
- Menu should now be available on OS 3.1
- Fixed some minor bugs

Other Changes:
- Console now doesn't log status logs by default


If everything works, this will probably the last update of JSE! Thanks for all of your support so far; without it I probably wouldn't have finished it, or at least not in this polished state!
I tried to make the best possible on-calc Lua Editor and now it fits my needs perfectly, and I hope it is and will be useful to other Lua programmers too!  :)
Sorry for nonsense.

Projects:



Offline pierrotdu18

  • LV2 Member (Next: 40)
  • **
  • Posts: 23
  • Rating: +1/-0
    • View Profile
Re: Jens' Script Editor - An on-calc lua editor
« Reply #220 on: February 12, 2015, 12:42:16 pm »
It seem really great !  ;D
Just one thing, I remember we talked about a system of priorities for the syntax highliting, would it be possible to add it or is it to long ? :)
Anyway, good job  :thumbsup:

Offline Jens_K

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 186
  • Rating: +52/-0
    • View Profile
Re: Jens' Script Editor - An on-calc lua editor
« Reply #221 on: February 12, 2015, 01:35:28 pm »
It seem really great !  ;D
Just one thing, I remember we talked about a system of priorities for the syntax highliting, would it be possible to add it or is it to long ? :)
Anyway, good job  :thumbsup:
It's already implemented, just press/click on + or - on the "Patterns" list  ;)
Sorry for nonsense.

Projects:



Offline pierrotdu18

  • LV2 Member (Next: 40)
  • **
  • Posts: 23
  • Rating: +1/-0
    • View Profile
Re: Jens' Script Editor - An on-calc lua editor
« Reply #222 on: February 13, 2015, 01:03:17 pm »
Wahou !
I was wondering why there were some "+" and "-" and I have The Answer  :angel:
Great, great, great, you're perfect  *.*

Offline Jens_K

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 186
  • Rating: +52/-0
    • View Profile
Re: Jens' Script Editor - An on-calc lua editor
« Reply #223 on: June 24, 2015, 09:37:08 am »
Hello again!
I said v2.1 was probably the last update, but it just had too many bugs I wanted to get fixed and I also wanted to implement the autorun feature, so here it is: version 2.2, the second final update :P

New:
- Autorun-option: Script now automatically runs when switching to the user script page (can be disabled in the settings menu)
- Revised autocompletion: Autocompletion now immediately inserts completions
- New double-size character handling for chinese characters (and unintentionally some other adjacent characters)
- New key combination: ctrl + ^ acts like the Pos1-Button; it sets the cursor to the left-most position
- You can now add custom highlighting-start/end flags by placing empty captures in your pattern:
  - E.g.: The pattern "%a()%d+()%a" on the line "foo42bar" will only highlight "42"
- Updated API Reference Guide's content to apilevel 2.4
- The "Change Indentaion"-tool can now also change the indentation of only the selected code
- Added a 'Help' button and corresponding message for the "Custom Highlightig" dialogue
- You can now use the [×] and [÷] buttons to scroll through the guides' articles

Fixed and improved other minor stuff:
- Reordered graphical functions in the autocompletion menu to fit the (subjective) average amount of usage
- "Find..."-Dialogue now keeps its settings
- Color-adjustments for grayscale displays
- Fixed a lot of interface problems on desktop mode
- on.create and on.construction are now only called on their associated apiLevel
- Editor now checks for and denies 0 character matching patterns (which would freeze the editor)
- Pressing "enter" on a console line while entering a line to execute adds that line to your input
- Editor now warns you if you select "Emulator" on the initial device query dialogue (special keys are then disabled which would be a problem when sent to a handheld afterwards)
- shift+'+' and shift+'-' switched scrolling direction to fit the clickpad layout properly
- Fixed a frame-update problem when using ctrl+x
- Made keywords appear slightly darker by default
- Fixed possible lock-ups when using the menu during a dialogue
- Numbers are not highlited in identifiers anymore (using the new pattern flag feature
- Execution Page script clean-up
- Fixed some errors in the guides due to parsing-errors and typos

The updated file is attached to the first post.
So this is it, I probably won't bother you anymore with any further updates, I had my fun with this project  ;)

PS: wtof1996 from cncalc.org is has currently started working on a chinese translation of JSE2.2, so if you're chinese maybe you should keep an eye on that.


EDIT: Reuploaded a slightly updated file: Fixed a timer-freeze problem after restarting a script on OS 3.2
« Last Edit: July 01, 2015, 06:56:18 pm by Jens_K »
Sorry for nonsense.

Projects:



Offline Weley

  • LV0 Newcomer (Next: 5)
  • Posts: 1
  • Rating: +0/-0
    • View Profile
Re: Jens' Script Editor - An on-calc lua editor
« Reply #224 on: January 08, 2017, 04:47:38 pm »
I just discovered this amazing editor! ;D But on on OS 3.1 pressing an arrow key on the editor page causes it to crash with error, "attempt to call a boolean value." I was able to fix it by deleting this part:
Code: [Select]
--disable specific arrow key events (to trigger the on.arrowKey(direction) event)
on.arrowUp=false
on.arrowDown=false
on.arrowRight=false
on.arrowLeft=false

So I've attached the version with that small fix.