Ah I was going to ask how you did it
The mesh way is something I've seen Vectis recommend as well. Great idea. The other method I saw was plonk a huge pile of yoghurt on a plate in front of them (or something else tasty). No mesh but they are so busy eating the owner was able to clip the nails one at a time without the hamster bothering.