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();
}
Copying the c4_View might be the cause of your error and is definitely
quite inefficient!Cheers,
Steve.
On Friday, Jan 24, 2003, at 19:43 Europe/London, Barbara Menzel wrote:
Here's an example of the type of constructor code I'm getting errors on...
CAreaBased::CAreaBased(c4_View vJustMeasured, c4_View vTreeTable)
{
int nRows = vTreeTable.GetSize();
if(nRows > 0) vJustMeasured.SetSize();
}
It is appropriately prototyped in the header file and when the object is
instantiated, there would be a view (vJustMeasured) equal in size to the
tree table which is then visible to the class CAreaBased. Using c4_View in
the constructor parameter list is what generates the unrecognized type
error.
(Embedded image moved to file: pic11773.gif)
Jean-Claude
Wippler To: Metakit mailing list <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]> cc:
Sent by: Subject: Re: [Metakit] Question on Views
metakit-admin@eq
ui4.com
01/22/2003 02:12
AM
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.
That's a typo, I assume: c4_View, not c4_view, right?However, passing a view as a parameter in a member function, there are no errors and everything works fine. The view can even be updated within the member function and returned with the updates included. Has anyone tried this or something similar with any success?Could you post a brief extract of the code you would like to get working? I'm having trouble understanding exactly what part is not doing what you expect. -jcw _______________________________________________ metakit mailing list - [EMAIL PROTECTED] http://www.equi4.com/mailman/listinfo/metakit <pic11773.gif>
_______________________________________________ metakit mailing list - [EMAIL PROTECTED] http://www.equi4.com/mailman/listinfo/metakit
