How do I scan all the objects on a card?

Ken Ray kray at sonsothunder.com
Wed Feb 12 16:09:01 EST 2003


Graham,

What might help is to compare it to SuperCard, as the approach is very
similar with the exception that there isn't distinct "cards" and
"backgrounds" so you don't have one set of IDs for objects on a "card"
and another set of IDs for objects on a "background". All objects in Rev
are on the same "plane", although some may be shared with other cards by
being grouped. Regardless, every object has its own unique ID, and there
is a stacking order of all objects on a card - you can't have one object
at the same "level" as another object - there's always a front-to-back
stacking order, just like in SC. The only unique feature here is that a
group acts as a single object as far as stacking is concerned, so if you
have four objects:

----- BACK OF CARD -----
  Button 1 - layer 1
  Field 1 - layer 2
  Button 2 - layer 3
  Field 2 - layer 4
----- FRONT OF CARD -----

and you then group Field 1 and Button 2 together (which brings the group
to the front), you get this:

----- BACK OF CARD -----
  Button 1 - Layer 1
  Field 2 - Layer 2
  Group 1 - Layer 3
----- FRONT OF CARD -----

If you then select the group and move it backwards, you have this:

----- BACK OF CARD -----
  Button 1 - Layer 1
  Group1 - Layer 2
  Field 2 - Layer 3
----- FRONT OF CARD -----

Now within the group itself, the objects have their *own* layering, so
if you were to edit Group 1, you'd have this:

=== BACK OF GROUP ===
  Field 1 - Layer 1
  Button 2 - Layer 2
=== FRONT OF GROUP ===

So to see it all, you'd have this:

----- BACK OF CARD -----
  Button 1 - Layer 1
  Group1 - Layer 2
     === BACK OF GROUP ===
       Field 1 - Layer 1
       Button 2 - Layer 2
     === FRONT OF GROUP ===
  Field 2 - Layer 3
----- FRONT OF CARD -----

and regardless of how you relayered the group itself on the card, the
objects *inside* the group don't relayer; in fact, you can't directly
set the layer of an object inside a group unless you set the
relayerGroupedControls to true, so you normally need to edit the group
itself, and then relayer the objects while "in" the group.

I hope this makes sense...

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/


----- Original Message -----
From: "Graham Samuel" <livfoss at blueyonder.co.uk>
To: "Revolution user discussion" <use-revolution at lists.runrev.com>
Sent: Wednesday, February 12, 2003 11:12 AM
Subject: RE: How do I scan all the objects on a card?


> On  Tue, 11 Feb 2003 20:03:30 -0800 "Jeanne A. E. DeVoto"
> <jeanne at runrev.com> wrote:
> >
> >At 1:14 AM -0800 2/11/03, Graham Samuel wrote:
> >[...] But what about
> >  >my objection from the transcript dictionary (the implication that
the
> >>numbers aren't unique?)
> >
> >Graham, can you be more specific about what gave you this idea? I'd
like to
> >correct it, of course, if there's a particular statement that's
unclear or
> >misleading....
> >
>
> Well, I guess I put 2 and 2 together and made 5, but I would be
> surprised if I was the only one...
>
> If you have a card with a lot of objects on it (well, more than one
> will do), and you look at the properties of any object via the
> Development Environment, you will see a set of four buttons for
> changing the object's layer - 'send to back', 'move backward', 'move
> forward' and 'send to front'. My mental model of the card was that
> the layers could be shared, so that one imagines 'sent to back'
> objects like the backdrop in a theatre, and foreground objects like
> props or actors, some sets of whom might be exactly the same distance
> from the front of the stage.
>
> With this mental model it's natural to assume that several objects
> could be **at the same level** at the same time. Indeed, this does
> happen on the Mac, I believe, where drawing programs based on
> QuickDraw can (for example) bring a whole bunch of objects to the
> front in one action. So I reasoned that layer numbers could not be
> unique. Of course the docs never say this, although the glossary
> entry for 'layer' could be interpreted that way:
>
> "The position of a control relative to the front and back; the order
> in which controls are stacked on the card"
>
> Now that I've looked into it more thoroughly of course I see that
> Revolution doesn't have 'my' model, although I have not yet worked
> out all the consequences (for example, a group will contain objects
> which by definition will all be on separate layers - what happens
> when I send the whole group to the back?).
>
> I'm sorry that people like me keep banging on about misconceptions
> we've somehow picked up on the way and then seem to be blaming them
> on the documentation. I do feel the docs are well done and therefore
> don't want to appear negative. Maybe it helps to see that different
> people approach issues from a different angle sometimes.
>
> Graham
> --
> -------------------------------------------------------------------
>           Graham Samuel / The Living Fossil Co. / UK & France
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list