.... that of course was the simple and clean solution. The IsEqualTo() function was something new to learn, though. Thanks, gentlemen!
------ Originalnachricht ------ Von: "Stephen Blair" <[email protected]> An: [email protected] Gesendet: 20.01.2014 13:03:01 Betreff: Re: concealing error messages
Maybe you can do a check before you parent: var oObj= CreatePrim("Cube", "MeshSurface", null, null); var oParent = ActiveSceneRoot; if ( oObj.Parent.IsEqualTo( oParent ) == false) { ParentObj(oParent, oObj); } On Mon, Jan 20, 2014 at 4:25 AM, Eugen Sares <[email protected]> wrote:Hi, for the sake of cleanness in my code - is there a way to hide the error message that shows when trying to parent an object to something that it is already child of? Can't get that try catch trick to work. Thanks! Eugen var oObj= CreatePrim("Cube", "MeshSurface", null, null); var oParent = ActiveSceneRoot; //ParentObj(oParent, oObj); // WARNING : 3030-EDIT-ParentObj - Command was cancelled. try { ParentObj(oParent, oObj); } catch(e) { //LogMessage(e); } -------------------------------------------------------------------------------- Diese E-Mail ist frei von Viren und Malware, denn der avast! Antivirus Schutz ist aktiv.
--- Diese E-Mail ist frei von Viren und Malware, denn der avast! Antivirus Schutz ist aktiv. http://www.avast.com

