Your terminology confuses me.
Don't worry, it confuses me sometimes too! Actually just frazzled right now so I sometimes type without thinking.
Mirar:
Programs can only inherit programs, not objects? Sounds complicated.
Martin Stjernholm:
Your terminology confuses me. You seem to mean "program" in many
cases
where you talk about "object"; it's for instance not possible to inherit an object - only programs (aka classes) can be inherited.
Sorry for the misunderstanding, the "clones of a specified object" part was just retardedness, forgive me my lack of caffeine, but the one "save the pointer to the program in the array if it inherits Obj X, iterate again," was meant to read "if it inherits Program X",
The point of that paragraph was basically stating that I could only find builtin functions for determining parents of programs and not objects.
As for your code Mirar, thanks for the time to post the idea, it is what I was basically thinking about already if there were no builtin solutions. The only major annoyance I had with that Idea was in the cleaning up of destroyed objects in the list (which was more due to laziness on my part and which your idea of set_weak_flag() takes care of quite nicely). A minor problem was that I was just being generally lazy and hoping there was something available to make it easier to find the children of an object.
Blah! It's just as simple to add it myself, I suppose =)
Mirar:
For what purpose?
So I can find all the children of a specified object!! *grin*
Kaylus
/ kaylus
Previous text:
2003-03-03 22:58: Subject: Children and Clones
Your terminology confuses me. You seem to mean "program" in many cases where you talk about "object"; it's for instance not possible to inherit an object - only programs (aka classes) can be inherited.
Anyway, whatever you mean there are probably no builtin tools to do lookups in the reverse direction, mostly because they are very uncommon operations.
/ Martin Stjernholm, Roxen IS