![]() |
Assert in CustomizeKeyboardPage |
Post Reply
|
| Author | ||
danpetitt
Senior Member
Joined: 17 July 2005 Location: United Kingdom Status: Offline Points: 109 |
Post Options
Thanks(0)
Quote Reply
Topic: Assert in CustomizeKeyboardPagePosted: 31 July 2006 at 2:55pm |
|
|
I am getting an ASSERT in CXTPCustomizeKeyboardPage Constructor:
These are my calls in CMainFrm::OnCreate:
Why is this, whats an OriginalAccelerator, why do I need it and why isnt it there?
I am not using "LoadCommandBars" to load/save them, I am using PropExchange.
Can you point me in the right direction.
|
||
![]() |
||
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 July 2006 at 3:22pm |
|
|
Don't call
pCommandBars->GetShortcutManager()->SetAccelerators( IDR_SGENIETYPE );
just
pCommandBars->GetShortcutManager()->SetAccelerators( IDR_MAINFRAME );
only last accelerators for last call used.
|
||
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
![]() |
||
danpetitt
Senior Member
Joined: 17 July 2005 Location: United Kingdom Status: Offline Points: 109 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 July 2006 at 3:43pm |
|
|
Problem is, I am not getting any of my mainframe shortcuts in the customize dialog or available to my application without using the "SetAccelerators(IDR_SGENIETYPE)". |
||
![]() |
||
danpetitt
Senior Member
Joined: 17 July 2005 Location: United Kingdom Status: Offline Points: 109 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 July 2006 at 5:15pm |
|
|
What I found is that my DoPropExchange on (first time) is destroying the accelerator table ready for loading in, but there is nothing to load in so now I have no accelerators.
Any ideas what to do?
|
||
![]() |
||
danpetitt
Senior Member
Joined: 17 July 2005 Location: United Kingdom Status: Offline Points: 109 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 July 2006 at 5:25pm |
|
|
More investigation seems that if the saved XML file doesnt have any shortcut section then it clears the accelerator table and cant fill it back with anything. What it ought to do is only UpdateAcellTable (CXTPShortcutManager::DoPropExchange) if "accels.GetSize()" then it will only replace when there is something to replace it with. Or even modify "CXTPShortcutManager::UpdateAcellTable":
|
||
![]() |
||
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 August 2006 at 9:29am |
|
|
Hello,
no, it is designed behaviour. don't change it. Just delete old xml configuration file.
|
||
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
![]() |
||
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |