Page 1 of 1
Copy and Paste problem while editing long stored procedure
Posted: Tue 05 May 2009 01:55
by KiwiJem
Hi,
1) When I copy and paste a section of code from one place to another while editing a stored procedure, the cursor USUALLY jumps to the bottom of the file, as if that is where the Auto Format On Paste was last working. This means I keep losing my place in the file.
2) I am now using version 3.50.275, and an additional problem occasionally occurs. Now, sometimes a Paste causes the whole editor to hang as if it had just written outside of an array. Obviously I lose unsaved work, as I have to kill the dbForge session, and start again. I cannot reproduce this one on demand yet.
Does anyone please know what I am doing wrong, or if there are work-arounds for these?
Thanks.
BTW, I LOVE the new features in 3.5. Thanks
Posted: Tue 05 May 2009 13:33
by Elias
Hello, it seems to be a bug. But we cannot reproduce the problem.
Can you send us some steps to reproduce the problem using the last build?
Posted: Thu 07 May 2009 21:47
by KiwiJem
Thanks - I will as soon as I get back onto that project. Regards
Posted: Fri 08 May 2009 09:38
by Elias
Hello,
We have fixed another request that looks similar to yours. The fix will be available in the next build.
Can break it on demand, now
Posted: Tue 12 May 2009 03:46
by KiwiJem
Ok here goes. I am using the | character to show where the cursor is
- Make sure Automatic format on paste option is on.
Start a new TRIGGER procedure
Type in some Enters after the Begin to create vertical space
Enter a label for a BEGIN BLOCK e.g. label: BEGIN
You should have:
- Move the cursor to the beginning of the labelled line
Press Shift Down to highlight the line,
Duplicate the line in the normal manner by Ctrl-C Ctrl-V Ctrl-V
Press Ctrl-V (paste) once
Note it has reformatted and the the cursor is now after the END like this
- Press Ctrl-V again, and the Duplicate is in the wrong place like this.
Code: Select all
BEGIN
mylabel:
BEGIN
ENDmylabel:
BEGIN|
Even if you put the label and the BEGIN on separate lines, and only copy the BEGIN, the cursor still jumps past the end.
When you do this on a large file, copying a large block, the "END" becomes hidden within the duplicate, and it is a mess to sort out.
When I had accidentally had a semicolon after the last END one time, and did this, the whole program hung, and had to be killed and re-started.
The cursor pointer is clearly getting lost.
Posted: Tue 12 May 2009 09:48
by Elias
Hello,
Thank you for the report. We have fixed the problem in the dbForge Studio for MySql 3.50.287. It will be available for download today.
Apllication hanging during code editing
Posted: Wed 13 May 2009 00:14
by KiwiJem
Please tell us more about apllication hanging during code editing. We have fixed the bug with application hanging after code pasting in the current build.
I think it is the same or related issue, and I am using ver 3.50.275
It appears to be the result of the Automatic format on paste. This runs the cursor down to the end of the code to do the format, and does not return it to where you were working.
I think you have what is known as a one-off error .
I am implementing triggers on most of our tables to create rows in history tables. As a result, most of the triggers are very similar to others, with a bit of replacement of table names etc. So I do a lot of copying and pasting, using the existing triggers as templates for the new.
In the times that it has hung, I have copied and pasted similar code from another trigger, including the main begin-end, so I highlight the placeholder begin-end in the new (empty) trigger code, and paste in the template code, replacing what was there, rather than adding into the middle of the begin-end that was there.
Note that if you paste INSIDE the existing begin-end, you will avoid "boundary errors" that might be lurking in the code.
Occasionally, I have NOT replaced these as cleanly as I might, and I have left an extra character or two AFTER the final END - eg ENDD or END; - and if it is going to hang, THAT is when it will.
I suspect that the auto formatter stops when it gets to the D of the final END, and leaves things pointing in the wrong places.
I have a screen shot of a "hung" edit window showing where the cursor ended up. Is that useful to you?
Regards, kiwijem
BTW - The editor is also not happy if I put a label: BEFORE the first begin, although MySQL is happy with that. This seems to confuse your auto-formatter, but has not to my knowledge caused a crash. It is the end of the code in the edit window that seems to be the buggy place.
Posted: Wed 13 May 2009 02:05
by KiwiJem
Thank you for the new 3.50.287 download. I will let you know how I go!

Posted: Wed 13 May 2009 09:26
by Elias
KiwiJem wrote:Thank you for the new 3.50.287 download. I will let you know how I go!

The problem with application hanging has to be solved in 3.50.287. And we made some fixes in formatting triggers since the 287 build. Now Format document command works correctly and formatting after paste also

.
Thanks very much for your assistance.
Posted: Thu 04 Jun 2009 02:58
by KiwiJem

Thank you - all seems to have been fixed in the latest build
