Page 1 of 1

Add "Run which sub-script?" header to multi-script popup

Posted: 08 Jan 2015 18:01
by aliteralmind
I *just* got the meaning of this popup:

Image

It's asking me which sub-script do I want to run, because my *non* multi-script script file is improperly indented. I've seen this a few hundred times since starting with XY, having no clue what it was for. I thought it was just some advanced thing I wasn't getting, seeing just a bunch of random code lines from my file.

Please consider adding a "Run which sub-script?" header to this popup.

Re: Add "Run which sub-script?" prompt to multi-script popup

Posted: 08 Jan 2015 18:11
by TheQwerty
aliteralmind wrote:Please consider adding a "Run which sub-script?" header to this popup.
It's just a typical menu and it's not often that they have headers, so it would look a bit silly and be non-standard.

Further, this would make many many existing scripts uglier.

EDIT: Though, let me add, the current reliance on white-space can be a bit of an annoyance at times. We've discussed various ways to improve it but at this time they would all require a new approach to script files and thus some way to identify old vs. new versions and act accordingly.

Re: Add "Run which sub-script?" prompt to multi-script popup

Posted: 08 Jan 2015 18:30
by aliteralmind
I don't see how any newbie (or me, who's been *heavily* using XY for about a month now) could understand the meaning of this dialog. I think it makes sense to have a "Run which sub-script?" header being the default for the sake of newbies, but turn-offable for everyone else. At the very least, it would give new XY-ers an indication that their indentation is off...especially given the odd requirements, as you mention.

Re: Add "Run which sub-script?" header to multi-script popup

Posted: 09 Jan 2015 14:37
by aliteralmind
Corrected title from "prompt" to "header".

Re: Add "Run which sub-script?" header to multi-script popup

Posted: 09 Jan 2015 15:50
by Stefan
aliteralmind wrote: because my *non* multi-script script file is improperly indented.
I've seen this a few hundred times since starting with XY, having no clue what it was for.
...
I don't see how any newbie (or me, who's been *heavily* using XY for about a month now) could understand the meaning of this dialog.
That's just the result of the code you've written.
You have to learn first what to do and how. (Do correct indent, like with Python script too)

Tip: there is a help file:
Press F1 > Advanced Topics > Scripting > Multi-line Scripts and Multi-Scripts


 

Re: Add "Run which sub-script?" header to multi-script popup

Posted: 09 Jan 2015 16:12
by aliteralmind
XY-script is deceptively deep. A header as I'm suggesting would help new XY scripters learn it quicker.

Much of my time in the past month has been spent in the documentation.

Just insult me directly, please. No need to pretend it's a tip.

Re: Add "Run which sub-script?" header to multi-script popup

Posted: 09 Jan 2015 22:10
by PeterH
Stefan wrote:...

That's just the result of the code you've written.
You have to learn first what to do and how. (Do correct indent, like with Python script too)
In general, I'd say no to this :naughty:
Computers are to help us. And if a user makes a mistake, it should help as much as possible to recognize, what's wrong. XY often ignores errors, especially when scripting, and so often makes it rather hard to find out why we have a wrong result, a non-working script, or whatever. And we talk about coding: who codes makes errors, that's for sure!

So some times you win some minutes by not coding correct, but XY somehow doing the right thing. Then you loose some hours(!) by searching for a (small!) error. I'd prefer if XY would give much more info about errors.

But: in this situation I'm not convinced that some header would really help - it even wouldn't descibe the error itself. It just would ask to select between things you don't recognize :shock:
So I think: it's not enough reason to change it.

Re: Add "Run which sub-script?" header to multi-script popup

Posted: 09 Jan 2015 22:41
by aliteralmind
I still think it would be a good thing, but I see your point, PeterH.