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 to create self-referencing objects?
Moderator: George Gilbert
Forum rules
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
Please read the Forum rules and policies before posting. You may

- Gambit37
- Should eat more pies
- Posts: 13769
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
How to create self-referencing objects?
Last edited by Gambit37 on Wed Jan 28, 2004 4:54 pm, edited 1 time in total.
- andyboy_uk
- On Master
- Posts: 647
- Joined: Thu Feb 20, 2003 1:51 am
- Location: London, UK
- Gambit37
- Should eat more pies
- Posts: 13769
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
I don't understand your sample. Is the word 'and' important?
The problem is that RTC checks for any object listed in the CONVERT_TO paramter. If it doesn't already exist, it generates critical errors.
So it's not possible to do this:
MY_FLASK_EMPTY .... CONVERT_TO(MY_FLASK_FULL)
MY_FLASK_FULL .... CONVERT_TO(MY_FLASK_EMPTY)
...because the definition for MY_FLASK_EMPTY includes a CONVERT_TO reference to an object that has not yet been defined....
The problem is that RTC checks for any object listed in the CONVERT_TO paramter. If it doesn't already exist, it generates critical errors.
So it's not possible to do this:
MY_FLASK_EMPTY .... CONVERT_TO(MY_FLASK_FULL)
MY_FLASK_FULL .... CONVERT_TO(MY_FLASK_EMPTY)
...because the definition for MY_FLASK_EMPTY includes a CONVERT_TO reference to an object that has not yet been defined....