Sendmessage and editorscripts

I have a script with:

@script ExecuteInEditMode()
function UnLockDecals()
{
	gameObject.SendMessage ("UnLock");
}

And an editorscript that triggers this with a button.
Attached to this gameobject are gameobjects with a script that has a UnLock() function.

My problem is that when I press the button in my editor script, the UnLock() is never triggered instead I get the error message:
SendMessage UnLock has no receiver!

I used SendMessage in other places, so perhaps sendmessage just does not work in the editor?

is the script with the unlock function attached to the same object as the script that calls it? If it’s attached to a child use BroadcastMessage and if it’s attached to a parent use SendMessageUpwards.

I added this as an answer so that you can set the question to answered.