Page 1 of 1

Minor bug in module variable creation

Posted: Tue Sep 17, 2013 9:06 pm
by SurajJaldu
Hello,

When inserting a new module variable, module variable is not being created where the cursor is but it is being created between the constructor and Run() method.

Thanks,
Suraj

Re: Minor bug in module variable creation

Posted: Tue Sep 17, 2013 9:13 pm
by krstcs
I could be wrong, but I believe this was an intended change in order to keep all module variables in an expected and consistent location.

My vote: I don't consider it a bug, but a helpful feature.

Re: Minor bug in module variable creation

Posted: Wed Sep 18, 2013 1:40 pm
by Support Team
Hello,

At the moment a module variable is generated between the constructor and Run() method if the location of the cursor is outside a method. If the cursor is placed within a method the module variable will be created above the method. We will discuss if the issue internally.
Now we have two votes, some more are appreciated :-)

Regards,
Bernhard

Re: Minor bug in module variable creation

Posted: Fri Sep 20, 2013 10:36 pm
by SurajJaldu
This might be not a bug but it really doesn't work as user expects it to work.

Re: Minor bug in module variable creation

Posted: Mon Sep 23, 2013 3:30 pm
by Support Team
Hello,

I have already added an entry in our bug tracking system.
We will analyze and discuss the behavior internally.
Thank you for reporting this issue.

Regards,
Bernhard

Re: Minor bug in module variable creation

Posted: Mon Sep 23, 2013 5:12 pm
by carsonw
My vote... let the user put the variables where they want, don't chose for them. If someone likes the new place, let them put the cursor there, if someone likes the old place, let them put the cursor there.

When you are creating a class, if you have variables that are used throughout the class, you generally put them at the top of the class, not between two different methods that may or may not use those variables.

My two cents :)

Re: Minor bug in module variable creation

Posted: Tue Sep 24, 2013 1:50 pm
by krstcs
My suggestion would be to automatically create a #region for module variables in all code modules, just like is already done in the recordings, and put them there, if you the user wants to move them they can.

The problem with just putting them where the cursor is, is that the cursor may not be in an appropriate spot. Module variables should not be inside methods, for example, because by definition they belong in the class (module).

Re: Minor bug in module variable creation

Posted: Fri Sep 27, 2013 9:02 am
by Support Team
Hello,

Thank you!
We will discuss the different suggestions internally!
Thank you for your help.

Regards,
Bernhard