Method code for $sys.create()

[Turn on line numbering]
arg parents, name, manager;
var new;

new = create(parents);
catch any {
    new.initialize();

    // niggle the names around... $has_name may have initted the wrong name
    new.set_objname(name);
    if (new.has_ancestor($has_name) && new.name() == "#" + new.objnum()) {
        catch ~invname
            new.set_name(substr(tostr(new), 2));
    }

    // let it manage itself
    new.change_manager(manager);
} with {
    // Failed to initialize the child; destroy it.
    $sys.log_traceback(traceback(), "CREATE (" + parents + ", '" + name + ", " + manager + ")");
    (| new.destroy() |);
    rethrow(error());
}
return new;

["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]

the Cold Dark