IDE Method in Method

I had 2 projects openned in Xojo, MyProject1.xojo_binary_project and MyProject2.xojo_binary_project . I copied 3 Methods from MyProject1 to MyProject2 , but I didn’t do it carefully and I don’t know how I did but it openned a new Tab App which display only the Method instead of display Constants , Event Handlers , Method etc. . And I reach to obtain a Method inside another Method. I suppose I paste a Method twice. I erased it, but when I saved MyProject2 Xojo crashed, when relaunch it asked me to recover Project but I click No as I saved few minutes before. But when I opened MyProject2 it was empty, as if I just created it. I loose everything :frowning: . I’m happy, I saved on an external drive just yesterday.

I tried to do it again but it’s not easy. In the screencapture above I have (SepY as int16) and (SepY as int16) as string inside SeparFenetres. I don’t know if it’s normal to obtain that ? I’m not sure this problem made Xojo crash, but I very rarely crash Xojo and I suppose it is this strange thing.

That looks normal. You are simply overloading the SeparFenetres function. The first overload takes parameter (SepY as int16) and returns nothing. The second one takes the same param and returns a string value. I doubt this would cause a problem.

I always take great care when copying and pasting in Xojo. It’s been a bit unreliable in the past. I don’t do too many items at once - if possible I do one at a time. And I use the menu items to copy and paste, not the keyboard shortcuts. Also make sure the item you’re copying is actually highlighted with the color blue in the navigator.

Methods with the same name and different parameters (and/or return value) are shown that way. It is called Overloading of a method name. See Function Overloading.

Ah ok, thank you Tanner and Eli. I didn’t know Function Overloading . Then I was wrong when I thought it was the origine of the crash.
Usually I copied Method One at a time, but maybe I copy and paste 2 at a time. Often the same problem, I was happy to finish Methods which worked in Project1 then I quickly pasted them in Project2 to test. And boom, crash !

My project2 is 34 614 304 octets, the one which crashed is 28 octets, then nothing was saved. I tried to copy paste again in a copy of my project but I couldn’t make Xojo crash again.

Thanks again for your help.