Moved file needs to be opened and saved

Ranorex Spy, Recorder, and Studio.
bkruse
Posts: 38
Joined: Tue Jul 20, 2010 12:19 pm

Moved file needs to be opened and saved

Post by bkruse » Tue Aug 24, 2010 3:56 pm

Ranorex 2.3.3.8879

In Projects View, I drag a rxrec file to another folder to move it there.
My Solution still compiles, which made me curious because I have references to the moved rxrec.
Code completion does not find the moved file at its new position.
Even building the solution does not solve this.

Opening the moved rxrec file with a text editor shows that the information about the namespace (/recordtable/[email protected]) and external repository (/recordtable/[email protected]) have not yet been changed!
Opening the moved rxrec file, it opens "dirty", as if I had modified something (which is not the case).
After saving it, the text editor shows the mentioned values as saved.
Only from now on, code completion will find the moved file at its new (namespace) position!

Is this behavior intentional?

regards, Björn

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

Re: Moved file needs to be opened and saved

Post by Support Team » Tue Aug 24, 2010 5:22 pm

You have made an interesting observation, and I can understand how it might seem a little strange. But, yes, this behavior is intentional. This is because the code is only updated by the recording designer after you've opened and saved the changes.

Regards,
Ron
Ranorex Team

bkruse
Posts: 38
Joined: Tue Jul 20, 2010 12:19 pm

Re: Moved file needs to be opened and saved

Post by bkruse » Wed Aug 25, 2010 8:16 am

But you are aware that opening a moved file, saving and closing it will cause the Project build process to fail?
Doesn't seem right to me, but if it's intentional you surely have arguments for it :)

Just allow me the question: why not update the code (as open/save/close does) after the movement action?

regards, Björn

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

Re: Moved file needs to be opened and saved

Post by Support Team » Wed Aug 25, 2010 1:14 pm

Yes, you are correct about the compile being broken. This is an unfortunate side effect caused be the recording being put into a new name space. Currently you will need to update the code manually to correct the missing name space. We will be adding functionality so that the user will not be burdened with this in the future.

Regarding the code update, it's in the todo list. Currently only the designers handle code generation, not Ranorex Studio itself. So that means that if the designer for the recording or repository isn't open, the code won't be updated.

So, I guess what I meant by "behavior is intentional", is that it was intended to delegate all code generation to the designers. But, this of course has some unwanted side affects.

Regards,
Ron
Support Team

bkruse
Posts: 38
Joined: Tue Jul 20, 2010 12:19 pm

Re: Moved file needs to be opened and saved

Post by bkruse » Wed Aug 25, 2010 1:39 pm

Sounds good, thanks for the input!

cheers, Björn