I would like to be able to drag&drop script files in the editor, currently it seems to freeze the program
€ and another crash when creating a new function. unfortunatels the crash log disappeared (message was something like "count must not be negative" if I saw it correctly)
Interestingly enough, when crashing it asked me, if I want to save the file before closing the program, so I did that and it worked fine; however I was not able to simply continue, the program did shut down itself after saving. Very unusual crashing behavior xD.
€ I was able to reproduce the crash:
I entered a new function, like this:
voidfoo(){
Then, the } was added automatically. Then I pressed enter, so the } would drop a line:
voidfoo(){}
After that, I pressed }, because I was not aware about the bracket being already there, and got a crash:
voidfoo(){}}
I have the possibility to ignore the error or to end the program, but both choices lead to the question if I want to save my work and to the shutdown of the program.
Other things:
Remove the save file question for empty files
The include only skeleton includes about 20 linebreaks as well (no big deal, though)
tabs still translate to 6 spaces in the galaxy editor (or better: some kind of 6-space-tab. If you press tab in the editor, it becomes a 4-space-tab, but copied tabs from any sorce become 6-space-tabs)
Auto completion after return should be fixed in 1.3.2.. Are you sure you got that one?
Nope, got the old one. Works now.
Quote:
Copying seems to work for me.. Where do you copy from?
I wrote a new function in your editor and copied it in a custom script. Still the same problem occasionaly (not every time)
Quote:
I'm pretty sure it inserts 4 spaces.. tried to do
tabbed
1234
and it lines up (unlike here)
Tab translates to 4 spaces in your editor, but when copying these tabs to the galaxy editor, they become 6 spaces. Notepad+ has the same issue, though (it has an option to convert all tabs in the script to 4 "real" spaces, that fixes the problem)
Quote:
Hmm. I don't like the idea of a automatically including stuff, since there is no such thing in the sc2editor(correct me if I'm wrong), so doing that would cause my program to accept code which will be rejected by the sc2editor.
Good point. Maybe add the include only thing to the configuration to add optional includes with it?
Added a new version. It just contains some minor changes - implemented/fixed some of the suggestions/bugs you posted about above. Don't know what's up with that crash.. Did you just open up the program and load the default skeleton?
yep, indeed. Nothing more.
€ other things (will probably edit in more):
Autocompletion does not seem to work in a line you start with a return.
When copying some code into the editor, some line breaks get lost. For example:
if(Foo(u)){Bar(u);}
becomes
if(Foo(u)){Bar(u);}
Tabs get translated to 6 spaces in the editor, should be 4.
maybe add a standard include folder in the programs directory, where you can put script files which should automatically be included?
the program asks, if you want to save an unsaved file, when creating a new file, but not, when you close the program.
some functions do not show the parameter tooltip, for example DialogCreate or DialogControlCreate
Just had another crash, this time right after creating a new file with a default skeletion. Right after the parsing was complete, it crashed; I did not touch anything besides creating the new empty skeleton, so I was obviously not able to reproduce it.
Crash Message (translated again):
The register was changed. It is possible, that the enumeration process cannot be continued.
@Kueken531: Go
When you say "until now" dose that mean it crashed/showed the autocompletion in the background now?
It did not crash at all, the "until now" was just to point out, that I did not really test it that much, so it is still possible that it can happen.
The autocompletion popping up at the start of the program seems to be another issue, but caused no further trouble than having to click the main window one time.
I am not that familiar with xml files, how could I highlight functions like described earlier without having to include all of them in the file?
Tried it out, no crash until now, the sorting works nicely now, just like the parameter tooltip. The autocompletion-in-background thing did not happen again until now.
Some little things bug me a little, but most of them are no big deal and would not require an update from my perspective:
The installer is kinda... slow, it takes a quite huge amount of time for such a small program. Additionaly it always creates a desktop shortcut without being able to skip that (at least I did not find where to skip it)
When starting the program, about 50% of the time it starts with an open autocompletion window either in the front- or background.
autocompletion has some noticeable loading time, when there is a huge number of functions found, which leads to a bit of irritation. Maybe start autocompletion only when you enter 2 characters to shrink the list thus decrease the loading time? For 1-2 character stuff, you probably would not need the autocompletion anyway.
autocompletion also triggers, when you open a string with " (only for the first word, it seems).
I would like to see another template, just with the standard include without the whole map script bunch, so one does not have to c/p the include or use the whole map bunch when he just wants to write one quick function.
maybe (maybe :p ) customizable syntax highlighting styles? Either completely customizable, so everyone could choose preferred colors and styles or some predefined styles to choose from or something.
As stated, these are minor issues/suggestions and partly personal preference, so you do not need to bother that much ;)
Sounds really weird that the autocomplete form is displayed behind the main form, since I set it to always be display as the topmost. Would be nice if you could recreate it, but multithreadding probably makes that a bit difficult.. I can try periodically reminding it to be on top.
It happened several times, however I was not able to notice a pattern behind this. Manually reproducing did not work once.
Yeah, I display unreachable code as a warning, since it will compile and run but it isn't very nice to carry a bunch of unnecessary junk.
Well, still the question if a double semicolon should be unreachable code or a syntax error ;)
Quote:
As for the auto completion.. It's possible that one only remember a part of the function name, and not the beginning. That's why I did it that way. It still sorts the list so if there are something that matches what you wrote from the beginning, that will be on top, so I don't think I'll change that.
For example, if you have something called aFoo, bFoo, fooA and fooB, and you type foo they will be listed as
fooA
fooB
aFoo
bFoo
Does not work that way for me, the list is always alphabetically sorted, regardless of which part of the functions I entered (if I enter "Unit" for example, the first function shown is AIAbilityGroup, because its parameters contain the word unit)
But when this works like you intend, I agree, this would be the best solution, since you would not need an additional list, get the intuitive way and still have access to all related functions.
Quote:
What do you mean syntax highlight for functions?
When you entered a valid function name, it has the standard color of text. Just make it another color or bold similar to the keywords.
I noticed some more problems with the autocompletion: Sometimes the list will be shown in the background only (so you have to actually tab out of the script editor to see it). If this happens, you cannot select an item from the list, more specific it has no effect on the text editor if you do so, the selected function will not replace your last written word like it should.
I am not sure, when this happens, but if it happens once, it will not stop behaving that way until I restart the editor.
€ selecting an item from the list with the mouse does not seem to work in general. Selecting with arrow keys + enter works fine, but a mouse click does nothing and even mouseclick + enter has no effect.
€ and another crash when trying to create a new void function named "bla", it crashed, when I wanted to enter the "a". I was not able to reproduce this one.
Crash message (translated): Index out of bounds. Index must not be negative or smaller than the list. Parameter name: index.
So basically, this is a syntax error with the double ; but its valid galaxy code for the galaxy editor as well as your editor. Your editor just throws a warning, because the ; is after the return, thus unreachable.
The autocompletion for functions works nicely, however, I would like to see parameters as I type them.
Also I am not sure about the showed functions for autocompletion. Notepad+ shows only functions, which begin with the characters you entered, yours shows any function containing this set of characters. I think for the autocompletion, the notepad+ variant is more intuitive, you could implement your variant in an extra option, a native list or function search or something, which you can activate separately.
Syntax Highlightning for functions would be nice, as well.
Seems that the reason for the missing constants might very well be that I only included the core trigger libs.. not the extra stuff from liberty.
There are some new stuff in there that I need to add to my editor, such as writing integers as 0x002 and static methods (if someone knows just what makes a static method special in galaxy, I would like to know). Also, how does the operator ! make sense for a point/order? (as in if(!myPoint) ...)
Dunno about the point thing, static functions cannot be called from another object (if you have a static function in a custom script object, you cannot use that function in another custom script object). Still needs to use an unique name, though -.- (did anyone find an alternative to prefixing yet? really sucks.)
c_unitInventoryChangeLoses does not match any previously defined fields or locals
c_unitInventoryChangeUses does not match any previously defined fields or locals
c_unitInventoryChangeGains does not match any previously defined fields or locals
c_syncFrameTypeAchievementMenuButton does not match any previously defined fields or locals
c_syncFrameTypeTeamResourceButton does not match any previously defined fields or locals
All of them are valid constants.
€ trying to parse my map script with the new version causes the editor to crash (the old version only showed the mentioned errors)
I wanted to attach the error message and the map script, but did not find a hide / spoiler option and don't want to pollute the post ;) I will send you per PM, if you ask for it and have a need for it or edit them in as soon as I found hide or something ^^
€ could have just attached them... well, now I sent them per PM ;)
results in
Ah, okay. What about making it toggleable instead of having to use it every time you copy?
I would like to be able to drag&drop script files in the editor, currently it seems to freeze the program
€ and another crash when creating a new function. unfortunatels the crash log disappeared (message was something like "count must not be negative" if I saw it correctly)
Interestingly enough, when crashing it asked me, if I want to save the file before closing the program, so I did that and it worked fine; however I was not able to simply continue, the program did shut down itself after saving. Very unusual crashing behavior xD.
€ I was able to reproduce the crash:
I entered a new function, like this:
Then, the } was added automatically. Then I pressed enter, so the } would drop a line:
After that, I pressed }, because I was not aware about the bracket being already there, and got a crash:
I have the possibility to ignore the error or to end the program, but both choices lead to the question if I want to save my work and to the shutdown of the program.
Other things:
Nope, got the old one. Works now.
I wrote a new function in your editor and copied it in a custom script. Still the same problem occasionaly (not every time)
Tab translates to 4 spaces in your editor, but when copying these tabs to the galaxy editor, they become 6 spaces. Notepad+ has the same issue, though (it has an option to convert all tabs in the script to 4 "real" spaces, that fixes the problem)
Good point. Maybe add the include only thing to the configuration to add optional includes with it?
yep, indeed. Nothing more.
€ other things (will probably edit in more):
Just had another crash, this time right after creating a new file with a default skeletion. Right after the parsing was complete, it crashed; I did not touch anything besides creating the new empty skeleton, so I was obviously not able to reproduce it.
Crash Message (translated again):
The register was changed. It is possible, that the enumeration process cannot be continued.
It did not crash at all, the "until now" was just to point out, that I did not really test it that much, so it is still possible that it can happen.
The autocompletion popping up at the start of the program seems to be another issue, but caused no further trouble than having to click the main window one time.
I am not that familiar with xml files, how could I highlight functions like described earlier without having to include all of them in the file?
Tried it out, no crash until now, the sorting works nicely now, just like the parameter tooltip. The autocompletion-in-background thing did not happen again until now.
Some little things bug me a little, but most of them are no big deal and would not require an update from my perspective:
As stated, these are minor issues/suggestions and partly personal preference, so you do not need to bother that much ;)
It happened several times, however I was not able to notice a pattern behind this. Manually reproducing did not work once.
Well, still the question if a double semicolon should be unreachable code or a syntax error ;)
Does not work that way for me, the list is always alphabetically sorted, regardless of which part of the functions I entered (if I enter "Unit" for example, the first function shown is AIAbilityGroup, because its parameters contain the word unit)
But when this works like you intend, I agree, this would be the best solution, since you would not need an additional list, get the intuitive way and still have access to all related functions.
When you entered a valid function name, it has the standard color of text. Just make it another color or bold similar to the keywords.
I noticed some more problems with the autocompletion: Sometimes the list will be shown in the background only (so you have to actually tab out of the script editor to see it). If this happens, you cannot select an item from the list, more specific it has no effect on the text editor if you do so, the selected function will not replace your last written word like it should.
I am not sure, when this happens, but if it happens once, it will not stop behaving that way until I restart the editor.
€ selecting an item from the list with the mouse does not seem to work in general. Selecting with arrow keys + enter works fine, but a mouse click does nothing and even mouseclick + enter has no effect.
€ and another crash when trying to create a new void function named "bla", it crashed, when I wanted to enter the "a". I was not able to reproduce this one.
Crash message (translated): Index out of bounds. Index must not be negative or smaller than the list. Parameter name: index.
Crash Log attached (its german, though)
Interesting. My map script still throws errors:
Seems to be an issue in the native lib? dunno
My line 1186:
So basically, this is a syntax error with the double ; but its valid galaxy code for the galaxy editor as well as your editor. Your editor just throws a warning, because the ; is after the return, thus unreachable.
The autocompletion for functions works nicely, however, I would like to see parameters as I type them.
Also I am not sure about the showed functions for autocompletion. Notepad+ shows only functions, which begin with the characters you entered, yours shows any function containing this set of characters. I think for the autocompletion, the notepad+ variant is more intuitive, you could implement your variant in an extra option, a native list or function search or something, which you can activate separately.
Syntax Highlightning for functions would be nice, as well.
There are Triggerlibs in following paths:
mods/core.sc2mod/base.sc2data
mods/liberty.sc2mod/base.sc2data
campaigns/liberty.sc2campaign/base.sc2data
campaigns/libertystory.sc2campaign/base.sc2data
You got them all?
Dunno about the point thing, static functions cannot be called from another object (if you have a static function in a custom script object, you cannot use that function in another custom script object). Still needs to use an unique name, though -.- (did anyone find an alternative to prefixing yet? really sucks.)
done.
The ones I noticed:
c_unitInventoryChangeLoses does not match any previously defined fields or locals
c_unitInventoryChangeUses does not match any previously defined fields or locals
c_unitInventoryChangeGains does not match any previously defined fields or locals
c_syncFrameTypeAchievementMenuButton does not match any previously defined fields or locals
c_syncFrameTypeTeamResourceButton does not match any previously defined fields or locals
All of them are valid constants.
€ trying to parse my map script with the new version causes the editor to crash (the old version only showed the mentioned errors)
I wanted to attach the error message and the map script, but did not find a hide / spoiler option and don't want to pollute the post ;) I will send you per PM, if you ask for it and have a need for it or edit them in as soon as I found hide or something ^^
€ could have just attached them... well, now I sent them per PM ;)
+=, -= etc is catched as syntax error (i+=1; -> syntax error, expecting "=")
Usage of array records, too (MyRecord[i].myMember=5; -> syntax error, expecting ";")
Some constants are not included
Just in case you are not aware ;)