THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/04/2006 at 09:01, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.5
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;
---------
Hello everybody.
I've just begun to try to make modal dialogs in COFFEE, so I've made a test plugin which creates a single ComboBox in a dialog window. But, my problem is that the dialog closes immediately after the user selects an item of the ComboBox.
Here is my code :
class myDialog : GeModalDialog
{
public:
myDialog();
CreateLayout();
Command(id,msg);
}
myDialog::myDialog()
{
super();
}
myDialog::CreateLayout()
{
AddComboBox(1,0,0,0);
AddItem(1,1,"Button A");
AddItem(1,2,"Button B");
AddItem(1,3,"Button C");
}
myDialog::Command(id,msg)
{
}
class myPlugin : MenuPlugin
{
public:
myPlugin();
GetID();
GetName();
GetHelp();
Execute(doc);
}
myPlugin::myPlugin()
{
super();
}
myPlugin::GetID()
{
return 1000001;
}
myPlugin::GetName()
{
return "myPlugin";
}
myPlugin::GetHelp()
{
return "Something";
}
myPlugin::Execute(doc)
{
var d=new(myDialog);
d->Open(-1,-1);
return;
}
main()
{
Register(myPlugin);
}
I would appreciate your help. Thank you.