Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Malcolm D
|
Jul 12, 2007 - 11:04 PM
|
For "CanBeInsertedIntoPropertyGrid" to be useful in combined stores where the CExtPropertyValue objects might return false the CExtPropertyValueMixed and CExtPropertyValueMixedCompound class needs to check its children. Otherwise they will always return true and the return value from CExtPropertyValue’ or CExtPropertyCategory objects are not used
The CExtPropertyValueCompound and CExtPropertyCategory already do the correct thing. The sort of code which would be needed is bool CExtPropertyValueMixed ::CanBeInsertedIntoPropertyGrid() const { ASSERT_VALID( this ); INT nIndex, nCount = ItemGetCount(); for( nIndex = 0; nIndex < nCount; nIndex++ ) { if( ItemGetRefAt(nIndex).CanBeInsertedIntoPropertyGrid() ) return true; } // for( nIndex = 0; nIndex < nCount; nIndex++ ) return false; } If CExtPropertyValueMixed has it then CExtPropertyValueMixedCompound will to so only CExtPropertyValueMixed needs to be modified. I think CExtPropertyValue is the only one which should return true by default.
The user can then override CExtPropertyValue and CExtPropertyCategory if they wish (but they can’t do this for CExtPropertyValueMixed since they don’t control what sort of objects get create in the "Combine" function unless they modify the base code.
|
|
Technical Support
|
Jul 16, 2007 - 1:38 PM
|
We agree with you. The method was added.
|
|