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 |
|
Damien Castelltort
|
Dec 13, 2006 - 2:32 AM
|
Hi,
I noticed a problem in the CExtGridCellProgress class. If the SetRange method is done before the SetStep method, then the new range is not taking in account if upper - lower < 10 (10 is the default value of m_nStep).
Also, why the first test if "m_nRangeUpper < m_nRangeLower" and not "nUpper < nLower" ?
void CExtGridCellProgress::SetRange( INT nLower, INT nUpper ) { ASSERT_VALID( this ); if( m_nRangeUpper < m_nRangeLower ) { ASSERT( FALSE ); return; } if( m_nStep > (nUpper - nLower) ) { ASSERT( FALSE ); return; } m_nRangeLower = nLower; m_nRangeUpper = nUpper; m_nPos = m_nRangeLower; }
Thank you for the answers.
Aurelien Loizeau
|
|
Damien Castelltort
|
Dec 14, 2006 - 8:02 AM
|
Ok, so I will patch the method and wait for your update. For the m_nStep issue it is solved be doing it in the right order so no problem with that.
Thanks again for the quick answer.
Aurelien Loizeau.
|
|
Technical Support
|
Dec 13, 2006 - 9:29 AM
|
Thank you for your comments. You are right, the SetRange() method should look like: void CExtGridCellProgress::SetRange(
INT nLower,
INT nUpper
)
{
ASSERT_VALID( this );
if( nUpper < nLower )
{
ASSERT( FALSE );
return;
}
... As for the m_nStep value what it would be if the user sets a range that is less than m_nStep ? We think this is a user-side problem and we do not need to control this situation
|
|