Re: Why the CompatXXX for dialog boxes?

Guy Rouillier <[email protected]> Tue, 22 Feb 2005 17:29:27 -0500
Newsgroups gmane.comp.version-control.cvs.gui.devel
Message-ID <20050222172927.1190a952@emach>
On Tue, 22 Feb 2005 09:39:56 +0100
Jens Miltner <[email protected]> wrote:

> Am 21.02.2005 um 23:44 schrieb Guy Rouillier:
> 
> >
> > I'm implementing the customize menu dialog for the context menus in
> > gCvs2.  I'm trying to follow the approach used by other dialogs. 
> > I'm curious why the dialogs are initialized with a non-class method
> > beginning with the word Compat; for example, the graph option dialog
> > is invoked via CompatGetGraphOptions.  Why not bring up the dialog
> > via the class constructor, which is what the Compat function seems
> > to be doing for all platforms?  I don't understand what value the
> > Compat function adds.  Thanks.
> 
> I suspect that it may have it's origin in historic implementations,
> but I'd also like to mention that most CompatGetXXX calls are _not_ 
> implemented as plain classes for MacCvs: They do make use of some 
> helper classes, but basically, they're just implemented as a regular 
> function.
> This doesn't prevent using a class constructor to do the work, but the
> use of a class constructor is much less obvious if there's no common 
> class to use. Since there's almost no code or data shared between the 
> platform implementations of the CompatGetXXX functions, I don't see
> how it would help them class based?

Jens, thanks for the reply.  I'm very new to all this code, so I'm
learning as I go.  I do see that not a lot of code is shared across the
platforms, though from what little experience I have it looks like more
could be.  You are correct, putting all the code into the class would
not reduce any complexity.  But the CompatXXX layer doesn't seem to be
helping any either.

You've helped my learning process.  Thank you.  I'll leave the Compat
layer in the new dialog I'm writing so that it is consistent with the
others.

-- 
Guy Rouillier


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/cvsgui-dev/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/