Serves me right for answering without looking at the source code (I'm at home) :)

On Friday, Jan 24, 2003, at 20:55 Europe/London, Jean-Claude Wippler wrote:

Steve Baxter wrote:

The problem might be that you are passing vJustMeasured and vTreeTable to CAreaBased by value. This makes a copy of the objects, which may not be allowed. You might be better passing a reference:

CAreaBased::CAreaBased(c4_View& vJustMeasured, c4_View& vTreeTable)
{
      int nRows = vTreeTable.GetSize();
      if(nRows > 0) vJustMeasured.SetSize();
}
No, that's not it. Objects of type c4_View are "smart pointers", using refcounts internally to avoid copying.

I suspect that the class contains a member which is not being initialized. The above code does nothing at all for a CAreaBased object: it just sets the size of one view given to to, to the size of another view given to it.

Can't say much more to help, without seeing at least the relevant part of the class definition.

Barbara Menzel wrote:

We are using MetaKit with Visual C++. Often, we find there is a need
to
initialize or perform some initial action on a view within a new class.
I've tried passing the view into the object via the constructor and get
several compile errors, primarily, c4_view is not a recognized type.
Please describe the error messages in more detail, and include the code snippet that causes it.

-jcw

_______________________________________________
metakit mailing list - [EMAIL PROTECTED]
http://www.equi4.com/mailman/listinfo/metakit

_______________________________________________
metakit mailing list  -  [EMAIL PROTECTED]
http://www.equi4.com/mailman/listinfo/metakit

Reply via email to