public object Askfor(String typeName)
        {
            if (typeName == null)
            {
                UserInterface.ShowMsgAskForEnter("Pause..");
                return(null);
            }

            if (TypesHelper.GetNodeOrEdgeType(typeName, impl.curShellProcEnv.ProcEnv.NamedGraph.Model) != null) // if type is node/edge type let the user select the element in yComp
            {
                if (!CheckDebuggerAlive())
                {
                    impl.errOut.WriteLine("debug mode must be enabled (yComp available) for asking for a node/edge type");
                    return(null);
                }

                impl.debugOut.WriteLine("Select an element of type " + typeName + " by double clicking in yComp (ESC for abort)...");

                String id = debugger.ChooseGraphElement();
                if (id == null)
                {
                    return(null);
                }

                impl.debugOut.WriteLine("Received @(\"" + id + "\")");

                IGraphElement elem = impl.curShellProcEnv.ProcEnv.NamedGraph.GetGraphElement(id);
                if (elem == null)
                {
                    impl.errOut.WriteLine("Graph element does not exist (anymore?).");
                    return(null);
                }
                if (!TypesHelper.IsSameOrSubtype(elem.Type.PackagePrefixedName, typeName, impl.curShellProcEnv.ProcEnv.NamedGraph.Model))
                {
                    impl.errOut.WriteLine(elem.Type.PackagePrefixedName + " is not the same type as/a subtype of " + typeName + ".");
                    return(null);
                }
                return(elem);
            }
            else // else let the user type in the value
            {
                String       inputValue      = UserInterface.ShowMsgAskForString("Enter a value of type " + typeName + ": ");
                StringReader reader          = new StringReader(inputValue);
                GrShell      shellForParsing = new GrShell(reader);
                shellForParsing.SetImpl(impl.GetGrShellImpl());
                object val         = shellForParsing.Constant();
                String valTypeName = TypesHelper.XgrsTypeOfConstant(val, impl.curShellProcEnv.ProcEnv.NamedGraph.Model);
                if (!TypesHelper.IsSameOrSubtype(valTypeName, typeName, impl.curShellProcEnv.ProcEnv.NamedGraph.Model))
                {
                    impl.errOut.WriteLine(valTypeName + " is not the same type as/a subtype of " + typeName + ".");
                    return(null);
                }
                return(val);
            }
        }