Hi,
I'm trying to implement a configuration dialog with some tabs like the BasicSelectableDialog example from the sdk. I'm pretty sure I did all the relevant steps like defining LocaleIndex, IDList, IDListPair, Bosses etc. as well as the creator implementations. However when trying to pop up the dialog I get this error message:
"Cannot find IListBoxController on this selectable dialog. Is it a dropdown selectable dialog?"
In the ActionComponent I've implemented this:
if (dialogSwitcher == nil)
{
ASSERT_FAIL("BscSlDlgActionComponent::DoBasicSelectableDialog:DialogSw itcher invalid");
break;
} //ASSERT does not fail, I get the dialogswitcher
//still ok
dialogSwitcher->SetDialogServiceID(kConfigDialogTabService);
// this produces the error stated above:
dialogSwitcher->SwitchDialogPanelByID(kProjectTabWidgetID);
As a matter of fact, I don't know what Indesign wants to tell me with this, Listboxcontroller? Why would I want something like that on my dialog? ; ) Ok seriously, I guess I'm missing _some_ list definitions/declaration, propably of what should be in the panel, but the IDList is(are) defined in the fr file, so what else is missing?
Below some snippets from my code, the resource defs for the dialogs are missing but they are just the same as in the sdk example.
//Dialog holding the tabs
type ConfigDialog(kViewRsrcType) : DialogBoss(ClassID = kALConfigDialogBoss)
{
};
//a tab (other tabs are just the same, so I'm leaving them out
type ProjectTabWidget(kViewRsrcType) : PrimaryResourcePanelWidget(ClassID = kALProjectTabBoss)
{
};
//tab list
resource IDList (kConfigDialogTabOrderingResourceID)
{
{
kALProjectTabBoss, //correspondingWidgetID is kProjectTabWidgetID
kALOtherTabBoss,
kALAnotherTabBoss,
},
};
resource IDList (kProjectTabCreatorResourceID)
{
{
kConfigDialogTabService,
},
};
resource IDListPair (kProjectTabCreatorResourceID)
{
{
kConfigDialogTabService, kProjectTabResourceID, kALPluginID,
},
};
resource LocaleIndex (kProjectTabResourceID)
{
kViewRsrcType,
{
kWildFS, k_Wild, kProjectTabResourceID
}
};
//and the class defs, they CreatorImpl's were adapted from the sdk example
Class
{
kALConfigDialogBoss,
kTabSelectableDialogBoss,
{
IID_IDIALOGCREATOR, kConfigDialogTabCreatorImpl,
IID_IOBSERVER, kConfigDialogTabObserverImpl,
}
},
Class
{
kALProjectTabBoss,
kPrimaryResourcePanelWidgetBoss,
{
IID_IPANELCREATOR, kProjectTabCreatorImpl,
IID_IK2SERVICEPROVIDER, kDialogPanelServiceImpl,
}
},
Any help would be greatly appreciated, I know I can allways try to repeat the process of importing/adapting from the example until it works, but I really wan't to understand this and not just copy some code ; )
Thanks,
Marc
I'm trying to implement a configuration dialog with some tabs like the BasicSelectableDialog example from the sdk. I'm pretty sure I did all the relevant steps like defining LocaleIndex, IDList, IDListPair, Bosses etc. as well as the creator implementations. However when trying to pop up the dialog I get this error message:
"Cannot find IListBoxController on this selectable dialog. Is it a dropdown selectable dialog?"
In the ActionComponent I've implemented this:
if (dialogSwitcher == nil)
{
ASSERT_FAIL("BscSlDlgActionComponent::DoBasicSelectableDialog:DialogSw itcher invalid");
break;
} //ASSERT does not fail, I get the dialogswitcher
//still ok
dialogSwitcher->SetDialogServiceID(kConfigDialogTabService);
// this produces the error stated above:
dialogSwitcher->SwitchDialogPanelByID(kProjectTabWidgetID);
As a matter of fact, I don't know what Indesign wants to tell me with this, Listboxcontroller? Why would I want something like that on my dialog? ; ) Ok seriously, I guess I'm missing _some_ list definitions/declaration, propably of what should be in the panel, but the IDList is(are) defined in the fr file, so what else is missing?
Below some snippets from my code, the resource defs for the dialogs are missing but they are just the same as in the sdk example.
//Dialog holding the tabs
type ConfigDialog(kViewRsrcType) : DialogBoss(ClassID = kALConfigDialogBoss)
{
};
//a tab (other tabs are just the same, so I'm leaving them out
type ProjectTabWidget(kViewRsrcType) : PrimaryResourcePanelWidget(ClassID = kALProjectTabBoss)
{
};
//tab list
resource IDList (kConfigDialogTabOrderingResourceID)
{
{
kALProjectTabBoss, //correspondingWidgetID is kProjectTabWidgetID
kALOtherTabBoss,
kALAnotherTabBoss,
},
};
resource IDList (kProjectTabCreatorResourceID)
{
{
kConfigDialogTabService,
},
};
resource IDListPair (kProjectTabCreatorResourceID)
{
{
kConfigDialogTabService, kProjectTabResourceID, kALPluginID,
},
};
resource LocaleIndex (kProjectTabResourceID)
{
kViewRsrcType,
{
kWildFS, k_Wild, kProjectTabResourceID
}
};
//and the class defs, they CreatorImpl's were adapted from the sdk example
Class
{
kALConfigDialogBoss,
kTabSelectableDialogBoss,
{
IID_IDIALOGCREATOR, kConfigDialogTabCreatorImpl,
IID_IOBSERVER, kConfigDialogTabObserverImpl,
}
},
Class
{
kALProjectTabBoss,
kPrimaryResourcePanelWidgetBoss,
{
IID_IPANELCREATOR, kProjectTabCreatorImpl,
IID_IK2SERVICEPROVIDER, kDialogPanelServiceImpl,
}
},
Any help would be greatly appreciated, I know I can allways try to repeat the process of importing/adapting from the example until it works, but I really wan't to understand this and not just copy some code ; )
Thanks,
Marc