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
Minor bug in module variable creation
Re: Minor bug in module variable creation
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.
My vote: I don't consider it a bug, but a helpful feature.
Shortcuts usually aren't...
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Minor bug in module variable creation
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
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
-
- Posts: 29
- Joined: Sat Feb 25, 2012 12:10 am
Re: Minor bug in module variable creation
This might be not a bug but it really doesn't work as user expects it to work.
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Minor bug in module variable creation
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
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
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
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
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).
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).
Shortcuts usually aren't...
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Minor bug in module variable creation
Hello,
Thank you!
We will discuss the different suggestions internally!
Thank you for your help.
Regards,
Bernhard
Thank you!
We will discuss the different suggestions internally!
Thank you for your help.
Regards,
Bernhard