Toad World® Forums

Strange Behaviour of Editor on File Save


#1

Dear Toad Beta Group:

I have noticed a strange action of the Editor in your latest Beta 5.5.0.175

When saving a script or series of SQL commands, the editor tries to execute the
single line command the cursor is on (if it has bad syntax) and returns error
condition.

See below dumps

Fig I – Cursor on “BUM COMMAND” - Error Message displayed on
File Save

FYI…

John Stark

image003.jpeg
image001.jpeg


#2

I just tried and can repro this. But you have to click over to the messages tab
to see it. If you happen to have another tab displayed like Results it doesn’t
set the focus to the messages tab, and you don’t see an error. Still, seems
strange that it’s doing it at all like John says.

Darren
image001.jpeg


#3

Hi John and Darren,

From our point of view it is useful feature. Actually it works as deigned
– it is not executing the code, it is using the parser and reporting
syntax errors. And Darren’s comments proof that it is not so annoying.
Don’t you think so?

regards,

Alexander Maximov
image001.jpeg


#4

Dear Alexander:

Good point.

As long as the code does not execute, but is merely checked, all is OK.

Imagine exiting the editor with cursor on “DELETE FROM VENDOR”, or
some such line being executed.

Is this an option that could be turned on or off ? (“Syntax check on File
Save”)

Thanks for the good work.

John Stark
image001.jpeg


#5

What’s disconcerting is not that the syntax check ran – you can see
that from the red squiggly lines under the text that had the syntax error
– the issue is that it’s showing in the messages tab where
we’re used to only seeing results of things we execute.

The point is showing it there makes us think it executed something which causes
a temporary sense of panic until you realize it didn’t.

Put differently:
image001.jpeg


#6

Hi John,

The option is Tools\Optionns\Editor\Tools: Perform automatic syntax checks:

Yeah, I know that we have huge amount of options and sometimes it is not so
simple to find what you need right now. J BTW, I see that this option is not
documented in help file – I’ve created CR to update help.

regards,

Alexander
image002.jpeg


#7

Hi John,

The option is Tools\Optionns\Editor\Tools: Perform automatic syntax checks:

Yeah, I know that we have huge amount of options and sometimes it is not so
simple to find what you need right now. J BTW, I see that this option is not
documented in help file – I’ve created CR to update help.

regards,

Alexander
image001.jpeg