Re: Internal error in ui. 139
GWRepNate@aol.com
Tue, 17 Dec 1996 11:50:11 -0500
In a message dated 96-12-17 09:45:55 EST, jouni.miettunen@ccc.fi (Jouni
Miettunen) writes:
> Thought this story might amuse you..
>
> When you're doing a Settings dialog and have there several GenItemGroup
> lists that all have same values (eg. Yes/No) you might get the idea of
> reusing some objects.. You can't, it will crash the system - even when
> only of one the GenItemGroups is actually used == the object definition
> is enough to bring the system down.. but only at run-time. Weird.
>
> So you'll have to do separate duplicated items for each list.
>
> --jouni miettunen
>
> @visMoniker Option1Title = "Title 1";
> @object GenInteractionClass Option1 =
> {
> GI_visMoniker = @Option1Title;
> GI_comp = @Option1Group;
> }
>
> @object GenItemGroupClass Option1Group =
> {
> GI_comp = @ItemNo, @ItemYes;
> GIGI_selection = ID_NO;
>
> HINT_ITEM_GROUP_MINIMIZE_SIZE;
> HINT_ITEM_GROUP_DISPLAY_CURRENT_SELECTION;
> }
>
> @visMoniker Option2Title = "Option 2";
> @object GenInteractionClass Option2 =
> {
> GI_visMoniker = @Option2Title;
> GI_comp = @Option2Group;
> }
>
> @object GenItemGroupClass Option2Group =
> {
> GI_comp = @ItemNo, @ItemYes;
> GIGI_selection = ID_NO;
>
> HINT_ITEM_GROUP_MINIMIZE_SIZE;
> HINT_ITEM_GROUP_DISPLAY_CURRENT_SELECTION;
> }
This is because having one object under two different parents creates a
circle in the object tree. GEOS can't handle circular trees when it's sending
the messages to objects. Unfortunately the GOC preprocessor doesn't check for
objects with more than one parent, but the GEOS message-sending system will
catch the error and crash with the appropriate message (assuming you're
running Swat). I think this is an appropriate solution, since children with
more than one parent would be much more difficult to implement.
Nathan