Print Page | Close Window

Copy don't work anymore in 11.2.0!!!

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=8626
Printed Date: 06 October 2024 at 1:08am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Copy don't work anymore in 11.2.0!!!
Posted By: Michl
Subject: Copy don't work anymore in 11.2.0!!!
Date Posted: 31 October 2007 at 12:15pm
Hello Codejock-Team,
 
we build our ribbonbar dynamically and it works until 11.1.3.
 
Today we change the library to 11.2.0 and have the following problem:
 
After creating a ribbon group
CXTPRibbonGroup* pGroup = ribbonTab.AddGroup( IDS_RIBBON_GROUP_SERVER );
 
I add a copy of this group for displaying it in customize dialog box later (if called).
if (!customizeDialog.AddClone( pGroup->GetControlGroupPopup() ))
   return false;
 
This code calls
CXTPControls::AddClone
CXTPRibbonGroupControlPopup::Copy
CXTPControlButton::Copy
CXTPControl::Copy

This method copy all member attributes except m_Parent. This make sense and works like in 11.1.3.

After copying, following new code will be execute in CXTPRibbonGroupControlPopup:

ASSERT(m_pParent);
if
(GetRibbonBar() != ((CXTPRibbonGroupControlPopup*)pControl)->GetRibbonBar())
{
   m_pPopupGroup = GetRibbonBar()->FindGroup(GetID());
}
else
{
   m_pPopupGroup = ((CXTPRibbonGroupControlPopup*)pControl)->m_pPopupGroup;
}
 
Of course the ASSERT fails and GetRibbonBar(), too (because it also access to m_Parent).
When is m_Parent set??? It never possible, isn't it?
 
We like to release our update next week. Is it possible to get an fix or should we go back to 11.1.3?
 
Thanks



Replies:
Posted By: Oleg
Date Posted: 31 October 2007 at 2:10pm
Hello,
 
Thanks, I see your point.
 
Please replace these lines as
 
from
 ASSERT(m_pParent);
 if (GetRibbonBar() != ((CXTPRibbonGroupControlPopup*)pControl)->GetRibbonBar())
to
 
 if (m_pParent && pControl->GetParent() && GetRibbonBar() != ((CXTPRibbonGroupControlPopup*)pControl)->GetRibbonBar())
 


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net