lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [lmi] a less trivial patch: don't use deprecated MakeDefaultName(


From: Vadim Zeitlin
Subject: Re[2]: [lmi] a less trivial patch: don't use deprecated MakeDefaultName() + refactoring
Date: Mon, 2 Jun 2008 09:59:35 +0200

On Mon, 02 Jun 2008 01:52:36 +0000 Greg Chicares <address@hidden> wrote:

GC> The underlying problem has two aspects:
GC> 
GC> (A) Child documents need to be distinguished from documents that
GC> have no parent. In lmi, empty child documents are common, and
GC> we need a way to prevent users from trying to edit them (because
GC> they're empty). That's what LMI_WX_CHILD_DOCUMENT is intended to
GC> help with, though there seem to be implementation issues:
GC>   https://savannah.nongnu.org/support/?104430
GC> 
GC> (B) "If your parent closes, then you close" semantics are wanted
GC> for child documents. This isn't implemented at all in lmi today,
GC> and its absence is a usability issue:
GC>   https://savannah.nongnu.org/support/?104485

 Ok, so it's indeed time to really solve this issue. I didn't plan to do it
and simply noticed the suspicious LMI_WX_CHILD_DOCUMENT usage when I was
working on something else but it seems that the only way to really fix this
is to fix is properly.

GC> Now we're discussing three proposals:
GC> 
GC> (1) Do nothing: keep LMI_WX_CHILD_DOCUMENT. This addresses only
GC> aspect (A) of the problem, and in a fragile way. A future version
GC> of wx might use the style bit that LMI_WX_CHILD_DOCUMENT has
GC> appropriated, or assert that "unused" bits are clear.
GC> 
GC> (2) "switch the document template...to some ChildDocumentTemplate"
GC> as above, which "doesn't look very elegant". This addresses only
GC> aspect (A) of the problem. I agree that (1) is preferable to (2)
GC> in light of the effort that (2) would require.
GC> 
GC> (3) Use wxDocument::m_documentParent, present since v 1.1:
GC>   
http://cvs.wxwidgets.org/viewcvs.cgi/wxWindows/include/wx/docview.h?annotate=1.1
GC> This can address both aspects of the problem, replacing the
GC> LMI_WX_CHILD_DOCUMENT kludge.

 Unfortunately even though m_documentParent already exists, we still need
to add m_documentChildren or something similar which doesn't and can't be
added to wx 2.8 without breaking the ABI. Of course, this is just what you
wrote in the message linked to below...

GC> Here's a rough sketch of a proposal
GC>   http://lists.nongnu.org/archive/html/lmi/2008-03/msg00038.html
GC> to make wxDocument::m_documentParent actually useful. Is there
GC> any objection to that in principle?

 I don't think so, it seems perfectly fine to me and while I'd prefer to
post to wx-dev before implementing this proposal I don't see any reasons
anyone would object to it.

 The question for me is whether LMI

a) can wait for wx 2.9 or even 3.0
b) can use a patched wx 2.8 version
c) needs another workaround for the problem (B) working with pristine 2.8

?

 Thanks,
VZ





reply via email to

[Prev in Thread] Current Thread [Next in Thread]