Suppressing Unbound Variable warning

Ranorex Studio, Spy, Recorder, and Driver.
Pixi6s
Posts: 92
Joined: Tue Jun 28, 2011 8:57 pm

Suppressing Unbound Variable warning

Post by Pixi6s » Fri Jul 08, 2011 2:05 pm

I created a variable in a Recording Module, not to bind to a data element but to use withing the Recording Module within 2 separate user code steps.

One step sets it to a filename created on the fly and saves the image. The other step calls that filename to put an image in the log.

Is there anyway I can tell Ranorex 3.0.3 that the variable is not meant to be bound? OR do I just have to make it a repository variable. I am shying away from making a repo variable because I only need to use it within a single Recording Module. But I don't want the warning to continue to pop up in my report either.

I guess my other option is make one user code module to do more steps but I would like to know if I have this option first.

Let me know
Thanks
Sierra

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Suppressing Unbound Variable warning

Post by Support Team » Mon Jul 11, 2011 12:45 pm

Hi,
Pixi6s wrote:Is there anyway I can tell Ranorex 3.0.3 that the variable is not meant to be bound? OR do I just have to make it a repository variable. I am shying away from making a repo variable because I only need to use it within a single Recording Module. But I don't want the warning to continue to pop up in my report either.
The variables inside a Recording are used for Data Variables and therefore the warning is legally. You have to bind them to a data-source to get rid of the warning. The same is valid for the repo variables. These variables should be used only for the repo. If you want to use a Variable inside your user code item, please create your own property and use this inside the user code file. Therefore please take a look to following link http://msdn.microsoft.com/en-us/library ... .aspx#Y228

Regards,
Peter
Ranorex Team

Pixi6s
Posts: 92
Joined: Tue Jun 28, 2011 8:57 pm

Re: Suppressing Unbound Variable warning

Post by Pixi6s » Mon Jul 11, 2011 2:51 pm

That makes since. I kept trying to right click and make a variable that way, but I needed to make a regular old one. :lol: