Animal is not an immediate subclass of Shell

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Animal is not an immediate subclass of Shell

James Foster-3
In a new X6.0 image on WinXP SP2:
1. Open a System Browser
2. Open the 'Create Class...' window by menu Class / New
3. Click on 'Animal' in the Subclasses list
4. Click on '...' button to open 'Choose Superclass...' window
5. Click on the MVP folder in the top left tree
6. Click on 'Shell' in the Class List
7. Click the 'OK' button to close the 'Choose Superclass...' window
8. Returning to the 'Create Class...' window, note that the Subclasses list
is reset to exclude 'Animal' and nothing is selected
9. Type 'MyShell' in the 'New class name' text entry
10. Click 'OK' and observe the error

The work-around is to skip step #3.

James Foster


Reply | Threaded
Open this post in threaded view
|

Re: Animal is not an immediate subclass of Shell

Andy Bower-3
James,

> In a new X6.0 image on WinXP SP2:
> 1. Open a System Browser
> 2. Open the 'Create Class...' window by menu Class / New
> 3. Click on 'Animal' in the Subclasses list
> 4. Click on '...' button to open 'Choose Superclass...' window
> 5. Click on the MVP folder in the top left tree
> 6. Click on 'Shell' in the Class List
> 7. Click the 'OK' button to close the 'Choose Superclass...' window
> 8. Returning to the 'Create Class...' window, note that the
> Subclasses list is reset to exclude 'Animal' and nothing is selected
> 9. Type 'MyShell' in the 'New class name' text entry
> 10. Click 'OK' and observe the error
>
> The work-around is to skip step #3.

This behaviour is, I think, correct although a little obscure. You are
trying to create MyClass as a subclass of Shell and then place Animal
as a subclass of MyClass. The system does not allow you to do this; you
are only allowed to "insert" a class in the hierarchy, not rearrange
it. Hence the error message is correct Since it is telling you that
Animal is not an appropriate subclass for MyClass because it wasn't
originally a subclass of Shell.

In step 8 the subclasses list wasn't simply reset to exclude Animal
but, rather, to show the immediate subclasses of Shell (which don't
include Animal). I guess there is a minor bug here in that the original
selection of Animal in the subclasses list seems to be implicitly
remembered even though no selection is apparent. I've recorded this as
a cosmetic issue #2020.

Thanks for the report.

Best Regards,

--
Andy Bower
Dolphin Support
www.object-arts.com