Usercode function overloading not allowed from IDE

Ask general questions here.
nikhild
Posts: 1
Joined: Sat Jun 06, 2020 1:19 pm

Usercode function overloading not allowed from IDE

Post by nikhild » Sat Jun 06, 2020 1:27 pm

Dear All,

I am testing usecode functionality having one observation please follow the steps below:
1. Add usercode action created new method in IDE say Add()
2.Now copy user code action and Paste
3. Now add int argument in method Add(int i)
4. When click on Ok its asking All user code refreences of "Add()" updated to "Add(int i)" but i want two overloads of same method
5. But same thing i can do from userode.cs file.

Why such limitation from IDE only? Is there any specific reason?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6181
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Usercode function overloading not allowed from IDE

Post by odklizec » Mon Jun 08, 2020 1:30 pm

Hi,

Since you created a copy of User Code action, both actions point to the same method. In other words, whichever action you edit in UI, there is always edited the same method. If you want to create an overload method, you must go to directly to User Code and create a copy of method directly in User Code. Then you must link newly created method with overload to User Code action of your choice.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration