How to create self-referencing objects?
Posted: Wed Jan 28, 2004 3:25 pm
Here's a weird one:
How do I create an object that CONVERT_TO another that in turn CONVERT_TO the initial object?
For example, say I want an empty flask that CONVERT_TO a full flask that in turn CONVERT_TO an empty flask, ad infinitum?
I can't do it at present because when you define your new objects, RTC checks to see that it's CONVERT_TO object already exists... but in this case each one can't have a CONVERT_TO parameter without the other one already being defined!
This is a rather nasty catch-22 loop. How to get around it?
Don't suggest creating interim objects because the same thing applies!
How do I create an object that CONVERT_TO another that in turn CONVERT_TO the initial object?
For example, say I want an empty flask that CONVERT_TO a full flask that in turn CONVERT_TO an empty flask, ad infinitum?
I can't do it at present because when you define your new objects, RTC checks to see that it's CONVERT_TO object already exists... but in this case each one can't have a CONVERT_TO parameter without the other one already being defined!
This is a rather nasty catch-22 loop. How to get around it?
Don't suggest creating interim objects because the same thing applies!