On Tue, Apr 28, 2015 at 11:59 AM, 'Terry Brown' via leo-editor <
[email protected]> wrote:


> In the unrelated code I just pushed I noticed this works:
>
>          w.setAllText(txt)
>          c.p.b = txt
>          w.setInsertPoint(i+1)  # must come after c.p.b assignment
>
> whereas this doesn't
>
>          w.setAllText(txt)
>          w.setInsertPoint(i+1)
>          c.p.b = txt
>

​Heh.  That's the drawback of properties: they aren't what they seem.

c.p.b = txt isn't an assignment.  It is really c.setBodyString(p,val) which
does a lot.

Otoh, c.p.v.b = txt just sets v._bodyString, which may be what you want,
but probably isn't :-)

In general, p.aProperty can be very different than p.v.aProperty. In
particular, p.setDirty() is much more expensive than p.v.setDirty().  The
former does a redraw, the latter doesn't.

EKR​

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to