Memo #75151
From: inovatronics
Date: Fri, 31 Jan 92 15:52:58 EST
To: jwiede
Message-Id: <memo.75151>
Subject: About Groups...

John,

I've encountered some difficulties working with AppShell's group objects.
You might want to pass this information on to David Junod, but since they
affect AppBuilder's ability to create groups, I want you to know about
them.

AppShell causes a software error (divide by 0) when told to create a group
containing only 1 gadget (other than the group itself).  I'm sure that
Groups were not meant to have only 1 member, but it is impossible for this
not to be the case when designing the group within AppBuilder.  In
AppBuilder, the user will add one member, then the next, etc.  Currently I
crash when the first member is added.

While not finding a solution to the problem, I have been able to test
AppBuilder's Group List requester by disabling the automatic refresh of the
gadgets, adding more than 1 gadget to a group, then calling a routine to
refresh the gadgets.  Doing so, I have found some other problems with the
groups:

     AppObject's HGroup
     ------------------

     HGroup is further implemented than VGroup.  HGroups perform their
layout by ignoring the coordinates of the member gadgets, adjusting the
size of these gadgets to be the width of the widest member, and the height
of the tallest member, then proportionally spacing the gadgets horizontally
within the group.  If not all member gadgets fit within the borders of the
group, the members with the higher priority drop out, and the remaining
members get adjusted accordingly.

     This layout scheme works nicely, but does create some inconsistencies
with the normal rendering of certain gadgets.  String gadgets, for example,
can become taller within a group than is allowed by AppObjects for Strings
not within a group.  To see this, write an AppShell program containing an
HGroup containing a String gadget and a Palette Gadget.  Set the Palette
Gadget's height to 40.  The String gadget will become that tall as well.
While HGroup may not have been intended to be used this way, it must work
properly even in unusual circumstances.  With tools such as AppBuilder,
users will be able to test system gadgets as they've never been tested
before.

     AppObject's VGroup
     ------------------

     Unlike HGroup's layout, VGroup does NOT ignore the coordinates of the
member gadgets.  Thus a member with a left coordinate of 10 appears 10
pixels from the left edge of the group.  I believe VGroups should behave in
the same manner as HGroups, except spacing the gadgets vertically instead
of horizontally.

General Concerns from AppBuilder's perspective:
----------------------------------------------

     There needs to be a mechanism of some sort (perhaps a library call in
AppObjects) to determine the exact position and size of a gadget after it
has been processed by the various layout engines within AppShell.  Current
problems resulting from the lack of this ability:

     1) The Gadget Cursor is unable to ensure that it is properly
        representing the width and size of a selected item.  Some gadgets
        turn out to be smaller than the requested size, and there is not
        currently a way for AppBuilder to know this.

     2) The Gadget Cursor cannot determine the actual location of gadgets
        which are members of special layout groups.  Because of this, I
        will currently not support the use of Gadget Cursor adjustments on
        such member gadgets -- though the Gadget Cursor will work on the
        group itself.

James Nelson
INOVAtronics, Inc.
