The forced nature of nonviolent solutions

I remember from the book Nonviolent Communication (the original one) about a case where a woman was threatened to take off her clothes. When she expressed that she felt terrified and asked the perpetuator to not do that, the perpetuator then only asks for her wallet and went away with the wallet.

If she is capable of using violence to protect herself, for example, by carrying a gun, would she still be threatened?

(A sociological solution would be to reduce poverty in the area, for instance.)

Nonviolent resistance pioneered by Gandhi receives praise internationally for its nonviolent nature. If Gandhi himself thinks that violent resistance against the British colonist institution would not succeed, the nonviolent nature of his resistance movement is by necessity.

So I don’t think it is good to let nonviolent resistance take the moral highground, when it is the best solution to achieve a goal. Nor is it good to blame violent resistance for its violence, for that violence has been an essential part of humanity. Violence is quite useful too, if you can accept its consequences.