Page 1 of 1

Suppressing Unbound Variable warning

Posted: Fri Jul 08, 2011 2:05 pm
by Pixi6s
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

Re: Suppressing Unbound Variable warning

Posted: Mon Jul 11, 2011 12:45 pm
by Support Team
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

Re: Suppressing Unbound Variable warning

Posted: Mon Jul 11, 2011 2:51 pm
by Pixi6s
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: