>I have read it several time's, but for me it is not totally clear what
>with..endwith does. Maybee you can give me a small example in which I
>can see the meaning of with..endwith.
>
WITH ... ENDWITH example
WITH this.really.long.object.reference
.name = 'ABC'
.left = 10
.top = 10
.visible = .t.
ENDWITH
The object "this.really.long.object.reference" has properties (.name, .left,.top,.visible) and can be referenced without specifying the entire object reference for each property. WITH/ENDWITH can be nested, too.
WITH object.outer.reference
.name = 'outer' && same as "object.outer.reference.name"
WITH otherobject.ref
.name = 'inner' && same as "otherobject.ref.name"
&& other 'inner' object references can go here
ENDWITH
.left = 100 && other 'outer' references can go here
ENDWITH
I hope the last part did not confuse you more than it helped.
WITH/ENDWITH is really just a shorthand method to eliminate some typing while you're coding.