convert string to type?

Hey, i want to modify my unity editor, so i write a script to add components with their name. You can write the name in a textfield an then it adds the component with the name to den game object. But then i would add a component to the childrens, but this doesn't work. error : No appropriate version of 'UnityEngine.Component.GetComponentInChildren' for the argument list '(String)' was found.

here is my script code:

enter code here 

function OnGUI() {
    newcomponent = EditorGUI.TextField(Rect(10,25,position.width - 20, 20),
                "Component:", 
                newcomponent);
    if(Selection.activeTransform)
        if(GUI.Button(Rect(0, 50, position.width, 30), "Add Component"))
            for(var t : Transform in Selection.transforms)
               t.gameObject.AddComponent(newcomponent);
        if(GUI.Button(Rect(0, 85, position.width, 30), "Remove Component"))
            for(var t : Transform in Selection.transforms)
               if(t.GetComponent(newcomponent) != null){
                DestroyImmediate(t.GetComponent(newcomponent));
               }
                else{
                if(t.GetComponentInChildren(newcomponent) != null){
                     DestroyImmediate(t.GetComponentInChildren(newcomponent));
                     }
                }
        if(GUI.Button(Rect(0, 120, position.width, 30), "Deactivate"))
            for(var t : Transform in Selection.transforms)
               if(t.GetComponent(newcomponent) != null){
               t.GetComponent(newcomponent).enabled=false;
               }
                else{
                if(t.GetComponentInChildren(newcomponent) != null){
                     t.GetComponentInChildren(newcomponent).enabled=false;
                     }
                }
        if(GUI.Button(Rect(0, 155, position.width, 30), "Activate"))
            for(var t : Transform in Selection.transforms)
              if(t.GetComponent(newcomponent) != null){
              t.GetComponent(newcomponent).enabled=true;
              }
              else{
                if(t.GetComponentInChildren(newcomponent) != null){
                     t.GetComponentInChildren(newcomponent).enabled=true;
                     }
                }

`enter code here`

I think i need a function like parsetype or something. Does anyone have a solution for this problem?

I think the only way to do this is by using reflection. Namely Assembly.GetType (string);

import System.Reflection;

function WhatsTheType (myType : string) {
    Debug.Log ("This was a "+Assembly.GetExecutingAssembly.GetType (myType));
}

I hope the code will compile, used to writing C#. And also, I think the GetExecutingAssembly call is quite slow, so you might want to save that between the tests.