Jump to content

Photo

ZScript Code Editor


  • Please log in to reply
123 replies to this topic

#61 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 25 August 2013 - 06:38 PM

 This needs to become something like an official addition to ZC, to be honest. Have the official downloads include ZC, ZQuest, ZC Launcher, and this.

 

This. Seriously. I love this program, it has made my life about a billion times easier since I started using it.



#62 bobby_light

bobby_light

    Experienced Forumer

  • Members

Posted 26 August 2013 - 07:12 AM

Thanks guys!  I had completely shelved this, since I thought it was pretty much feature-complete as a proof of concept.  I was waiting for the project to become open source, as that's when the enhancements really could be made.

 

Aye, stuff like support for other imported headers such as ghost.zh is definitely something that could be added.

 

But before that happens, if there's a lot of support and bugs/feature requests, I'd be happy to keep it as up to date as possible until that happens.


  • Binx and David like this

#63 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 26 August 2013 - 09:42 AM

I'm not sure you could call them "bugs" per se, but it would be nice if you could choose the folder it defaults to (right now, if you pick "open", it always sends you to "my documents") and... What's with that Deku Leaf script that opens automatically whenever I open the program?



#64 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 26 August 2013 - 05:00 PM

Could it be possible to make it an option to rearrange how things are compacted when you shrink parts of the script down? As it is right now, I can hit the little minus button and shrink individual scripts down into a single line, and it's very easy to keep things organized. However, I end up with lines of comments and directions and stuff that doesn't get shrunken down with the rest of the script. Also, I tend to keep my global variables next to the individual scripts that use them the most, so they don't get included as well. Would that be a possible option to include, so it's easier to keep things neat and tidy?



#65 bobby_light

bobby_light

    Experienced Forumer

  • Members

Posted 26 August 2013 - 08:26 PM

I'm not sure you could call them "bugs" per se, but it would be nice if you could choose the folder it defaults to (right now, if you pick "open", it always sends you to "my documents") and... What's with that Deku Leaf script that opens automatically whenever I open the program?

 

Sure, those are just remnants of it being a demo.  A full-blown editor would remember your last directory, have a "recent files" list, etc.  Such features are already available in the "full editor" links in the project home page.  And the Deku Leaf script is again, just a random script I dropped into the editor for testing purposes.  It was a script recently added to the purezc forums at the time I started the project.

 

Could it be possible to make it an option to rearrange how things are compacted when you shrink parts of the script down? As it is right now, I can hit the little minus button and shrink individual scripts down into a single line, and it's very easy to keep things organized. However, I end up with lines of comments and directions and stuff that doesn't get shrunken down with the rest of the script. Also, I tend to keep my global variables next to the individual scripts that use them the most, so they don't get included as well. Would that be a possible option to include, so it's easier to keep things neat and tidy?

 

I think you're asking if groups of lines that are all only comments can be treated as a collapsible code block.  Is that right?  i.e.

// This is a function that
// does your taxes and pays
// your rent.
global script amazing {
   ...
}

You're asking if this snippet could be two fold regions, one for the comments in addition to the other for the script itself?  This would certainly be doable.  Multi-line comments would be nice to have in ZScript though.   :)

 

As for folding nearby variables along with scripts, that would be doable too, but that's not a common idiom found in code editors for other languages, so I didn't consider it here.


Edited by bobby_light, 26 August 2013 - 08:27 PM.


#66 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 28 August 2013 - 04:46 PM

Well, what I meant exactly was to be able to turn this...

const int thingy1;
const int thingy2;

ffc script doohicky{
    blah blah blah
    blah blah blah
        blah blah blah
    blah blah blah
        blah blah blah
        blah blah blah
            blah blah blah
            blah blah blah
        blah blah blah
    blah blah blah
    blah blah blah
}

//DIRECTIONS
//D0 - blah blah blah blah blah blah blah
//D1 - blah blah blah blah blah blah blah
//D2 - blah blah blah blah blah blah blah

...into just...

ffc script doohicky{

Of course, your method would be helpful as well, but it would be nice to pick and choose what gets compacted together. Maybe have it to where you can select a block of code, and right-click to bring up a menu with a "custom collapse" option, and then a window pops up to let you select what line stays at the forefront in the code itself and in the label map thing on the left.

 

EDIT: I wrote this out without seeing your last paragraph on your post. But yeah, it could be useful for ZScript. I don't think many other programming languages are designed to where you can just slot in individual bits and pieces to the same extent as ZScript, so I can see why it wouldn't be a common feature.


Edited by kurt91, 28 August 2013 - 04:48 PM.


#67 David

David

    Fallen leaves... adorn my night.

  • Administrators
  • Real Name:David
  • Pronouns:He / Him

Posted 30 November 2013 - 11:35 AM

Hey! I'm just wondering; is there a Mac version of this? Because that would be really nice! :)



#68 bobby_light

bobby_light

    Experienced Forumer

  • Members

Posted 02 December 2013 - 07:15 PM

Yes, you can try out the OS X demo or full editor on the project's site.

 

I hope to get around to updating this project soon.  The editor component has seen lots of updates since I last updated the ZScript-specific stuff, and the UI for the application in general can be jazzed up, but unfortunately ZQuest was never open-sourced, so I couldn't really get much further.  I'll keep it updated though in the hopes that one day we can build this out into a full-fledged, cross-platform ZScript IDE.


  • David likes this

#69 David

David

    Fallen leaves... adorn my night.

  • Administrators
  • Real Name:David
  • Pronouns:He / Him

Posted 03 December 2013 - 06:28 AM

Thanks! And that's great! :)

#70 David

David

    Fallen leaves... adorn my night.

  • Administrators
  • Real Name:David
  • Pronouns:He / Him

Posted 03 December 2013 - 04:07 PM

Actually, do you know if it is compatible with OS X Mavericks? Because when I download it, it says the disk image is broken, and tells me to eject it, or something like that. Do you know what is going on?



#71 bobby_light

bobby_light

    Experienced Forumer

  • Members

Posted 03 December 2013 - 09:20 PM

This is Apple being overly protective.  Newer versions of OS X only allow applications downloaded from the App Store by default.  More information can be found here:

 

http://support.apple.com/kb/ht5290

 

The fact that it says "damaged" instead of "untrusted developer" seems like a bug in OS X for some applications; googling the error comes up with several applications like this one that are actually OK, just not from the App Store.

 

Two ways you can work around this:

 

  1. Temporarily disable GateKeeper, as outlined in the article above.  Run the application, then restore the default GateKeeper settings.
  2. In a terminal, run the following command on the .app after you drag-and-drop it out of the disk image:

        cd /path/to/application
        xattr -rc ZScriptEditorDemo.app

    You can then double-click the app to run it without mucking with GateKeeper.

It's a sad time to be an open source developer on the Mac!  :(



#72 David

David

    Fallen leaves... adorn my night.

  • Administrators
  • Real Name:David
  • Pronouns:He / Him

Posted 07 December 2013 - 02:44 PM

Thank you! That worked! :D



#73 Keaton

Keaton

    Someone's post is being read.

  • Members
  • Real Name:Someone Else
  • Location:Somewhere

Posted 15 December 2013 - 01:22 AM

If I ever learn to do more than read script, and heck, even now, this will be and currently is very useful. A hundred rupees to you~


Edited by Someone, 15 December 2013 - 01:22 AM.

  • ShadowTiger likes this

#74 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 24 January 2014 - 08:37 PM

I just recently had to move to a new computer running Windows 7, and I'm having trouble with the program all of a sudden. For some reason, half the keys on the keyboard just stop working. I can't use "Enter", "Tab", the Arrow Keys, and I can't figure out why. It'll work for a few moments when the program first opens, but then they all stop working until I restart the program and get another two or three seconds before they stop again.

 

Do you have any idea why it does this, and how to make it work correctly again?



#75 bobby_light

bobby_light

    Experienced Forumer

  • Members

Posted 26 January 2014 - 08:19 PM

Strange, I have not encountered this before.  A couple of questions for you:

 

  • When certain keys stop responding, do they stop responding in the entire application, or just the code editor window?  For example, can you open the file chooser via File -> Open, type a file name, and hit Enter to open the file, or does Enter not work there either?
  • Is there a file in your home directory (e.g. C:\users\kurt91) named "uncaughtRTextAwtExceptions.log"?  If so, that file hopefully has an error message in it.
  • Does this happen in the demo application as well, or only in RText?

If the uncaughtRTextAwtExceptions.log file isn't there, you can also try running the program from the command line, and seeing if you see an error message printed there when this problem occurs.  To do that:

 

  • Open a command prompt (e.g. Start -> "cmd.exe")
  • Navigate to the folder RText is installed in, such as C:\Progra~1\RText
  • If Java is on your path, start RText like so:
    • java -jar RText.jar
  • If it isn't on your path, you'll have to give the full path to Java, something like:
    • "c:\Program Files (x86)\Java\jre7\bin\java.exe" -jar RText.jar

The double quotes are important if the path to Java has whitespace in it.

 

I'll also take a look into the parsing but you mentioned - about extra trailing commas I believe?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users