Minor bug in module variable creation

Bug reports.
SurajJaldu
Posts: 29
Joined: Sat Feb 25, 2012 12:10 am

Minor bug in module variable creation

Post by SurajJaldu » Tue Sep 17, 2013 9:06 pm

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

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Minor bug in module variable creation

Post by krstcs » Tue Sep 17, 2013 9:13 pm

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.
Shortcuts usually aren't...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Minor bug in module variable creation

Post by Support Team » Wed Sep 18, 2013 1:40 pm

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
.
Image

SurajJaldu
Posts: 29
Joined: Sat Feb 25, 2012 12:10 am

Re: Minor bug in module variable creation

Post by SurajJaldu » Fri Sep 20, 2013 10:36 pm

This might be not a bug but it really doesn't work as user expects it to work.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Minor bug in module variable creation

Post by Support Team » Mon Sep 23, 2013 3:30 pm

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
.
Image

carsonw
Posts: 178
Joined: Tue Nov 08, 2011 10:01 pm

Re: Minor bug in module variable creation

Post by carsonw » Mon Sep 23, 2013 5:12 pm

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 :)

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Minor bug in module variable creation

Post by krstcs » Tue Sep 24, 2013 1:50 pm

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).
Shortcuts usually aren't...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Minor bug in module variable creation

Post by Support Team » Fri Sep 27, 2013 9:02 am

Hello,

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

Regards,
Bernhard
.
Image