Topic: Please add a code refresh button to MVD.

Hello Dmitry.

Could you please add a code refresh button to refresh the code and load it again from script.pas.

This would allow us users to use Notepad++ to edit the code and search (and have more structured code) for procedures and functions since my project is almost 9000 lines.

A good place for this would be to the left of the "Support Forum" link on the "Script" view window.

It would GREATLY be appreciated!!! :~)

MAK

Re: Please add a code refresh button to MVD.

Hello,


Unfortunately I can't add this function.
It may cause one problem, if user accidental click refresh button, he will lost latest changes in the script.

Dmitry.

3 (edited by SWGAK 2016-06-29 16:38:37)

Re: Please add a code refresh button to MVD.

Why couldn't you simply ask the user if he's sure that he wants to reload the script again before doing it?

You could call it a "Revert" button to allow the user to revert to the saved version of the script.

Or maybe you could make it a registry hack for advanced users to turn it on thru the Windows registry and then let us/me know what the registry setting is to make the button visible in MVD?

This feature is very important to me and is desperately needed!

If you can't do the button, then at least add a code search feature.  This is very basic functionality that's missing from MVD.

Thanks

MAK

Re: Please add a code refresh button to MVD.

Press Ctr+F to show search dialog.


Unfortunately component which I use for highlight syntax works slow with bracketing, so bracketing automatically disabled when lines of code to much. I need to find another component for highlight syntax.

Dmitry.

Re: Please add a code refresh button to MVD.

I didn't know about your search feature.

You might want to add it to an "Edit" menu so the user can see that it exists.

Thanks Dmitry!

MAK

Re: Please add a code refresh button to MVD.

Hello Dmitry

As we are talking about improve script editor, would it be possible to add a function to go to a given line of the script (eg Go To Line ... like with CTRL-G shortcut like Lazarus) ?

Thanks

JB

Re: Please add a code refresh button to MVD.

There is also an annoying bug in the script viewer window where if either the "Begin" or "End" of one code block is off the screen when you click on "Begin" or "End", the Begin and End won't be highlighted in turquoise so you can see where the block ends.

It should highlight the entire block and not depend on whether it's all on the screen or not.

Thanks!

MAK

Re: Please add a code refresh button to MVD.

jean.brezhonek wrote:

Hello Dmitry

As we are talking about improve script editor, would it be possible to add a function to go to a given line of the script (eg Go To Line ... like with CTRL-G shortcut like Lazarus) ?

Thanks

JB

Thank you for your suggestion, I have added it in my plan.

Dmitry.

Re: Please add a code refresh button to MVD.

SWGAK wrote:

There is also an annoying bug in the script viewer window where if either the "Begin" or "End" of one code block is off the screen when you click on "Begin" or "End", the Begin and End won't be highlighted in turquoise so you can see where the block ends.

It should highlight the entire block and not depend on whether it's all on the screen or not.

Thanks!

MAK

Thanks for the bug report.

Dmitry.

Re: Please add a code refresh button to MVD.

Hello Dmitry,

I found another bug for you.

The behavior of the "Find" dialog is a little weird.

When you have the Find dialog up and type in something to search for and press enter, it starts searching for the entered text, but the focus changes to the script window and if you press enter again (normally pressing enter again would continue the search to find the next match) instead it deletes the highlighted text in the script window.  That is very dangerous behavior!

The focus should not end up on the script window while you are doing a search.  It should only highlight the text and move the window to the highlighted text, and return the focus to the "Find Next" button on the Find dialog.  You should have to click on the script window behind the find dialog to have the focus change to make a change to the script text.

Does that make sense to you?

MAK

Re: Please add a code refresh button to MVD.

Dmitry,

Do you happen to have a function already done to convert a TDateTime into a string that's already in sqlDate format?

I was trying this to save some time, but this won't work in MVD for some reason and just returns the date string?

Function SQLDate (PassedDate : TDateTime) : String;
Var
Temp, TempSQL : String;
BEGIN
    TempSQL := 'SELECT STR_TO_DATE('''+ DateToStr(PassedDate) + ''',''%m/%d/%Y'');';
    Result := SQLExecute(TempSQL);
END;

Thanks!

MAK