THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/08/2009 at 17:00, xxxxxxxx wrote:
okay .. so I am setting this up in the GetDEnabling ()member which includes which looks like this...
> `
\> Bool TrueSymmetry::GetDEnabling(GeListNode *node, const DescID &id;,GeData &t;_data,LONG flags,const BaseContainer *itemdesc)
\> {
\> /////////////////CHECK FOR EDITABLE///////////////////////
\> PolygonObject* op;
\> BaseContainer &data; = *((BaseObject* )node)->GetDataInstance();
\> BaseContainer* bc;
\>
\> PolygonObject* objPoly;
\> objPoly=(PolygonObject* )op;
\> if (!objPoly->IsInstanceOf(Opolygon))
\> {
\>
\> GePrint ("The object is NOT Editable");
\> switch (id[0].id)
\> { case SYMMETRY_PLANE:
\> return !blnSymmetryActive;
\> }
\> return FALSE;
\> }
\> else
\> {
\> GePrint ("The object is editiable");
\> switch (id[0].id)
\> { case SYMMETRY_PLANE:
\> return !blnSymmetryActive;
\> }
\> return TRUE;
\>
\> }
\> ///////////////////////////////////////////////////////////
\>
\> // Enable/disable our parameters
\>
\> switch (id[0].id)
\> { case SYMMETRY_PLANE:
\> return !blnSymmetryActive;
\> }
\> return TRUE;
\> }
\>
\>
`
I get the following errors.
(129) : warning C4700: uninitialized local variable 'op' used
(126) : warning C4101: 'bc' : unreferenced local variable
I know that these warnings are because neither of these variables are initialized in the GetDEnabling () member.
How do I initialize them within the member function without having to add BaseObject* op, and BaseContainer*, bc to the arguments. As this causes the GetDEnabling() to not execute properly.
Thanks,
~Shawn