Hot Door CORE Forum

Full Version: How to add Flyout menu to panel
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am a new one to Hot Door CORE and try to use it to develop illustrator plug-in. I want to create a panel with flyout menu. Currently, the panel has been created, but the flyout menu can't be added to the panel. Following are the code:
Code:
std::vector<hdi::core::EntryData> docPanelFlyoutMenuItems;
    hdi::core::EntryData docPanelFlyoutMenuItem = hdi::core::EntryData("2", "Write XML", NULL, true);
    docPanelFlyoutMenuItems.push_back(
                                      hdi::core::EntryData(
                                                           "1",
                                                           "Load XML",
                                                           NULL,
                                                           true
                                                           )
                                      );
    docPanelFlyoutMenuItems.push_back(docPanelFlyoutMenuItem);
    
    
    this->__docPanelFlyout = hdi::core::Flyout(docPanelFlyoutMenuItems);
    this->__docPanel.setFlyoutMenu(this->__docPanelFlyout);

This code can be compiled, but when i start Illustrator, the error message "Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)" popped at the last line of the code.

If there some one can help me, thanks.Smile
It's there some one can help, many thanks.
Thanks for trying out CORE and submitting the sample code for this problem. I will try it out soon and get back to you.
Which platform and version of Illustrator were you using?

Never mind, the platform and version would not have mattered.

The problem here is the simple omission of the overloaded assignment operator in the Flyout class. This will be fixed in the next release of CORE.

In the meantime, the workaround is to avoid using the assignment operator with Flyout objects. Change your code to use a Flyout* if you need the variable to be a member of your class (and allocate it during post-startup), or use a local variable instead.
(12-11-2014, 10:22 PM)garrett Wrote: [ -> ]Which platform and version of Illustrator were you using?

Never mind, the platform and version would not have mattered.

The problem here is the simple omission of the overloaded assignment operator in the Flyout class. This will be fixed in the next release of CORE.

In the meantime, the workaround is to avoid using the assignment operator with Flyout objects. Change your code to use a Flyout* if you need the variable to be a member of your class (and allocate it during post-startup), or use a local variable instead.

Hi Garrett,

Thanks for you kindly help!
I just thought I would let you know that 0.5.7 has been released, and it addresses this problem.