Setting Geometry on cloned objects

Bob Rasmussen brasmussen at earthlink.net
Tue Oct 8 00:26:01 EDT 2002


This note is about making your own calls to undocumented Geometry Manager
functions, rather than using the Geometry Manager stack.  Normally, I wouldn't
fiddle with undocumented interfaces, but in this case it seems like the right
thing to try.

I have a stack in which I need to clone a particular group an arbitrary number
of times.  The original group has a few controls in it.  The group and its
controls have been given Geometry Manager settings so they will resize
automatically to fit the width of the card. Some of the controls refer to the
group they are in. Some refer to other controls in the group.

I would like to arrange the clones below the original group in a column, such
that the clones have the same resizing behavior as the original (plus fancier
things if I get this to work).  Cloning, however, duplicates all the geometry
properties of the originals, including any object references in them.
Therefore, the geometry properties in the clones all refer back to the original
group and its controls, rather than to their own peers in the clone.

I have thoroughly reverse engineered the Geometry Manager stack, and I think I
know how to emulate what it does, but so far this has not worked.  I end up with
no geometry adjustment at all, and other things start acting a little weird.
I've tried doing it the "legal" way with calls to the undocumented
revSetGeometryObject, revGetGeometry and revSetGeometry, as well as to the
documented revCacheGeometry and revUpdateGeometry.  I've also tried setting
cRevGeometry properties directly.  Neither method works reliably.  I must be
missing some small detail.

This leads me to the following questions:

1.  Has anyone out there ever successfully used these undocumented interfaces?
Can you tell me what the incantation is?

2.  If I ever figure this out, am I wasting my time, since future versions of
Revolution may not work the same way on these undocumented interfaces?  Are
there plans to document these interfaces (or some new version of them)?

3.  Would anyone be interested in what I've managed to find out on my own so far
about these undocumented features?

4.  Short of writing my own Geometry Manager, does anyone have any other bright
ideas?

Thanks in advance.

RR





More information about the Use-livecode mailing list