Ok, I get the file storage. One down.
and then at run time some sort of nested object that "looks" like this:
vsz
+-addr1
+-addr2
\-hsz
+-city
+-st
\-zip
Yes, pretty much. One thing that can be confusing is that a sizer
is not an actual container; it's separate from the actual objects
themselves. They are simply rules that have object references attached
to them. In this example, all of the fields are contained by the form,
but the form has a layout method that iterates through its sizers and
arranges the controls accordingly.
Do Forms and Sizers both have a sizer colection?
In some sort of lisp like notation:
( addr1, addr2, ( city, st, zip ) )
Or in pointer values:
( 1, vsz, null )
( 2, addr1, 1 )
( 3, addr2, 1 )
( 4, hsz, 1 )
( 5, city, 4 )
( 6, st, 4 )
( 7, zip, 4 )
(lots more properties are stored, but im ignoring them to keep the
"pictures" simple.)
So somehow this structure is in memory, and then something can render
into what we see on the screen.
How close am I?
You are conceptually pretty close; the only difference is that a
sizer is not a container; it's a rule. The actual form hierarchy is
What is a rule?
form
+-addr1
+-addr2
+-city
+-st
+-zip
Without sizers, they'd all be jumbled up on top of each other. The
form has a Sizer property that contains its main sizer (in this case,
the vertical sizer), and when its layout() method is invoked, tells
this sizer to determine where its contents go. It in turn calls any
nested sizers, gets their size and position, and so on.
How does .layout() know what text boxes go with what sizers?
gets their size and position
I thought nothing had a position? I think you skipped a step.
^C
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users