PDA

View Full Version : How to re-factor statements into new method?


Sophie
05-31-2009, 11:35 AM
When a method M1 grows a bit too big, I would like to re-factor parts of it into a new method M2, and invoke M2 from M1. I could not find a way to copy/paste or drag/drop selected parts of M1 into M2. Is there a way to do this?

Thanks

tyler-id
06-01-2009, 06:20 PM
If you look at the top right corner of your Alice window, you will see a little clipboard icon. Just drag the portion onto the clipboard to copy it, and drag it from the clipboard to duplicate it.

Sophie
06-02-2009, 10:04 AM
thanks, tyler.